[sqlalchemy] Re: eagerload polymorphic object's relations, single table inheritance

2009-08-29 Thread Jae Kwon
I looked at this further, i think I got it working half way. Index: lib/sqlalchemy/orm/util.py === --- lib/sqlalchemy/orm/util.py (revision 6072) +++ lib/sqlalchemy/orm/util.py (working copy) @@ -387,6 +387,7 @@ if

[sqlalchemy] Re: eagerload polymorphic object's relations, single table inheritance

2009-08-29 Thread Jae Kwon
oops, it looks like the second form (session.query(Item).with_polymorphic([FooItem, BarItem]).options(eagerload(FooItem.foochild, BarItem.barchild))) works fine. should i go ahead and try to write test cases? - Jae On Aug 29, 2009, at 2:23 PM, Jae Kwon wrote: I looked at this

[sqlalchemy] Re: eagerload polymorphic object's relations, single table inheritance

2009-08-29 Thread Michael Bayer
at the very least I'd start with writing out the query exactly using join()/outerjoin(), then seeing if contains_eager() can do it. I'm not sure that the current traversal of attributes within the loading process can handle it, though. On Aug 29, 2009, at 5:50 PM, Jae Kwon wrote: