Ah, thanks for the quick response Mike - I'll keep an eye out for the fix.
Martin On Nov 29, 3:05 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > On Nov 29, 2007, at 7:54 AM, Martin Pengelly-Phillips wrote: > > > > > > > Hi there, > > > I have been using sqlalchemy for the past month with great success. > > However, recently I came across an unexpected situation. Essentially > > the results I was retrieving from the database via an ORM query were > > not including all the related attributes despite indicating eager > > loading on the mapper using lazy=False. > > > I have created an example script (below) to highlight the results I > > was getting. Note that after a bit of reading I discovered I could use > > contains_eager() on the query to obtain the correct result, but I am > > not sure if indeed this is the correct solution or if there is a flaw > > in my setup/understanding of the system. > > > As I see it from the SQL the first query is placing a limit 1 at the > > end of the full statement rather than as part of a subselect causing > > only 1 Tag to be retrieved with the Employee rather than the expected > > 2. > > hey Martin - > > that is completely a bug in SA. the query in the first test is not > detecting that it needs to apply eager compilation rules when clearly > it should. Ill have it analyzed and fixed today. > > - mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---