I tried depth 4, with fine gain control using eagerload_all options.
That works! Cool!
Thanks again for the great job!
Best
Jian
On Aug 22, 10:38 pm, Michael Bayer <mike...@zzzcomputing.com> wrote:
Hi Jian -
yes, its the PropertyAliasedClauses. I put in a fix + a test based
on your example in r3410. i didnt yet add a test for more levels
deep yet, though, so see how that goes.
- mike
On Aug 22, 2007, at 3:07 PM, Jian Luo wrote:
class Widget(object):
pass
mapper(Widget, widget, properties={
'children': relation(Widget, secondary=widget_rel,
primaryjoin=widget_rel.c.parent_id==widget.c.id,
secondaryjoin=widget_rel.c.child_id==widget.c.id,
lazy=False, join_depth=1,
)
})
sess = scoped_session(sessionmaker())()
and I want eager load the widget whose id=1 and all it's children if
any:
sess.query(Widget).filter(Widget.id==1).all()