-
-
Notifications
You must be signed in to change notification settings - Fork 106
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
If SQLAlchemy model declares a computed field, creating an instance of this class fails. This is true only when using persistence.
URL to code causing the issue
No response
MCVE
class Author(Base):
__tablename__ = "authors"
id: Any = Column(Integer(), primary_key=True)
age: Any = Column(Integer())
computed: Any = Column(Integer(), Computed(age * age))Steps to reproduce
Screenshots
"In the format of: "
Logs
def do_execute(self, cursor, statement, parameters, context=None):
> cursor.execute(statement, parameters)
E sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) cannot INSERT into generated column "computed"
E [SQL: INSERT INTO authors (id, age, computed) VALUES (?, ?, ?)]
E [parameters: (2201, None, 9325)]
E (Background on this error at: https://sqlalche.me/e/20/e3q8)Release Version
3.0
Platform
- Linux
- Mac
- Windows
- Other (Please specify in the description above)
adhtruong
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working