Re: [sqlalchemy] sqlalchemy.orm.exc.FlushError on subclass

2023-09-06 Thread Mike Bayer
if you can't correct this model to apply the persistence details to the concrete class you wish to persist and query, then you'd do the suggested "enable_typechecks=False". There is no attribute in SQLAlchemy named "meta" and no stack trace is given here so I dont know to what that refers. Ove

[sqlalchemy] sqlalchemy.orm.exc.FlushError on subclass

2023-09-06 Thread 'Luna Lucadou' via sqlalchemy
The project I am working on is split up into several modules. Previously, each module had its own ORM classes. However, due to several bugs arising from forgetting to update each module's ORM classes in lock step when adding new functionality, we have decided it would be best to extract the ORM

Re: [sqlalchemy] sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'PPESSOA' expected to update 1 row(s); 0 were matched.

2023-09-06 Thread Mike Bayer
it can be related to the driver or the "cloud" database you're using, we have lots of reports of SQL Server drivers not reporting on matched rows correctly On Wed, Sep 6, 2023, at 7:40 AM, Leandro Lázaro wrote: > I updated the driver to the latest version and removed the line > 'self.engine.dial

Re: [sqlalchemy] sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'PPESSOA' expected to update 1 row(s); 0 were matched.

2023-09-06 Thread Mike Bayer
changing it to false means if an UPDATE statement that expects to update on primary key in the ORM does not actually match any rows, the program continues and this may be a silent failure, leading to more confusing problems later if the row was in fact deleted or is otherwise non-existent. On T

Re: [sqlalchemy] sqlalchemy.orm.exc.StaleDataError: UPDATE statement on table 'PPESSOA' expected to update 1 row(s); 0 were matched.

2023-09-06 Thread Leandro Lázaro
I updated the driver to the latest version and removed the line 'self.engine.dialect.supports_sane_rowcount = False,' and the same error occurred again. Could this driver also have an unknown bug? TCLOUD_DATABASE_DRIVER_V18 = "/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.1.1" SQLALCHEMY