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.
views:
86answers:
1
+1
A:
I think you could look at the child's __dict__
attribute dictionary to check if the data is already there or not.
Haes
2008-11-04 07:48:26
It works, thanks :)
Joril
2008-11-05 09:03:47