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
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
Steps to reproduce
Screenshots
"In the format of:
"Logs
Release Version
3.0
Platform