Suppose you have a simple child-parent relationship defined as such:
parent_mapper = mapper(Parent, parent_table,
properties=dict(children=relation(Child)))
I would like to use introspection on the Parent obj to dynamically
determine that its "children" property is a collection of objects of
"Child" class.
In other words,
p = Parent()
p.children is an empty collection (list) []
Is there a way to determine what Class this collection expects to
hold? How do I use the p object to derive that p.children expects
"Child" objects?
Thanks in advance if anyone can help.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.