@orm.reconstruct is not executed when getting instances from relation
Issue #1725
resolved
i have an Enemy model with a reconstructor method
if i do session.query(Enemy).all()
the reconstructor method executes perfectly fine, but if i try to get data from defined relation in other model defined like this:
enemies = sa.orm.relation('Enemy',
backref=sa.orm.backref('sector'))
but when i get my enemies by doing foo.enemies, the reconstructor is not executed at all :(
Comments (2)
-
Account Deleted -
repo owner - changed status to invalid
no problem, thanks for following up.
- Log in to comment
sorry the bug is invalid..
i was appending enemies via relation, and i should have called the reconstructor method explictly it works now.