Nope, eagerloads are a no-go. I tried changing 901 of query.py again to: context.exec_with_path(m, value.key, value.setup, context, parentclauses=clauses, parentmapper=m)
but that did not work either. The code around exec_with_path and setup_query confuses me, I'm not sure I can fix eagerloads by myself. Currently without setting parentmapper=m it tries to find the columns in the table of the main entity, so I think this is at least a step in the right direction. On Dec 9, 2:15 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Dec 9, 2007, at 1:21 PM, Chris M wrote: > > > > > Is this how you want to do it? Unfortunately, just your fix alone > > doesn't do the trick BUT if you change line 901 of query.py to > > > context.exec_with_path(m, value.key, value.setup, context, > > parentclauses=clauses) > > > it works, and all ORM tests run fine. > > I think we should go for it, if for no other reason than add_entity() > is a fairly new method, so its better we start establishing the > "ordered" behavior sooner rather than later. > > Id be curious to know if acutal eager loads work off the second entity > also (im thinking...maybe ? ). > > you can commit this change if you'd like, but id ask that a few (very > short) tests be added to test/orm/query.py which validate the behavior > of options() both with and without an add_entity() (i.e., a test that > would fail if you didnt implement the feature). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---