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()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to