SQLAlchemy: does not call __init__
June 14, 2009 § Leave a comment
When performing query(), SQLAlchemy does not execute __init__ of the corresponding ORM objects.
Thus, if you have some logic inside __init__, those won’t get executed.
To have the desired behavior, you need to put such logic inside a function that takes no arguments, then, attach @orm.reconstructor on it.