py_assimilator
py_assimilator copied to clipboard
Problem with SQLAlchemy 2 DeclarativeBase model imports
Problem with SQLAlchemy 2 DeclarativeBase model imports
There is a new class for DeclarativeBase models in SQLAlchemy 2. The problem is in AlchemyRepository
querying. If the model import is different from the one in the Repository creation, then SQLAlchemy adds another SQL table selection to the query. That results in big overheads and possible sql errors.
Example:
SELECT * FROM users, users WHERE users.id = 1
However, the query should be:
SELECT * FROM users WHERE users.id = 1
This bug may be the result of SQLAlchemy2, but it still has to be fixed in PyAssimilator