On Jan 14, 2008, at 8:11 PM, Rick Morrison wrote:
> This is going to sound kind of strange, but I've noticed that > sometimes when doing fairly large eager loads, that not everything > always loads. > > So running, say > > custlist = S.query(Customer).options(eagerload('addresses'), > eagerload('properties')).filter( Customer.id.in_([...])).all() > > and fetching 120 objects, I'll find that 0-89 have properly > eagerloaded, but when I touch custlist[90].addresses, (or anything > higher than 90), it triggers a lazy load on the addresses. > > anyone else seen anything like this? > this can occur with certain kinds of joins, particularly self- referential joins, where the same entity appears more than once in a result set (at different levels)....although we have unit tests which ensure that this doesnt happen. the other case is if an entity is already present in the session; by default nothing gets written to it (including collections). so the short test case here would be helpful (also step through debugging output to see what decisions its making). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---