The do_orm_execute event is now used to set the default value for _default_language_id, since the old method (subclassing Query._execute_and_instances) is no longer supported. The old method is still there to maintain compatibility with 1.0-1.3.
A couple of double relationships referring to one another are now simply one relationship with backref=True.
Every relationship in pokedex/db/tables.py now has the attribute viewonly=True: this is required to silence many warnings added in 1.4, and it shouldn't do any harm since as far as I know beside the setup/load/dump functions nothing writes stuff into the database, and those don't really use the ORM to do so. If the SQLAlchemy version is at least 1.3.17 but less than 1.4 sync_backref=False is used as well (since 1.4 it defaults to False).
SQLAlchemy 1.4 now implements a warning about potential cartesian products in select statements. In pokedex/db/load.py there's an intentional cartesian product, adding q = q.filter(true()) is enough to silence the warning.
do_orm_execute
event is now used to set the default value for_default_language_id
, since the old method (subclassingQuery._execute_and_instances
) is no longer supported. The old method is still there to maintain compatibility with 1.0-1.3.backref=True
.pokedex/db/tables.py
now has the attributeviewonly=True
: this is required to silence many warnings added in 1.4, and it shouldn't do any harm since as far as I know beside the setup/load/dump functions nothing writes stuff into the database, and those don't really use the ORM to do so. If the SQLAlchemy version is at least 1.3.17 but less than 1.4sync_backref=False
is used as well (since 1.4 it defaults toFalse
).pokedex/db/load.py
there's an intentional cartesian product, addingq = q.filter(true())
is enough to silence the warning.Closes #330