With SQLAlchemy, is there a way to know beforehand whether a relation would be lazy-loaded?
For example, given a lazy parent->children relation and an instance X of "parent", I'd like to know if "X.children" is already loaded, without triggering the query.
From stackoverflow
-
I think you could look at the child's
__dict__attribute dictionary to check if the data is already there or not.Joril : It works, thanks :)
0 comments:
Post a Comment