Michael wrote: > On Apr 17, 2007, at 3:19 PM, jason kirtland wrote: >> instance.pro.append(class_mapper(Position)._instance(context, >> row, None)) >> >> ...does this need to go through the instrumented append() method >> or can I add them through my own, non-list method? [...] > > yes actually the way the eager loaders append is something like > this: > > if isnew: > appender = util.UniqueAppender(l.data) > # store appender in the context > selectcontext.attributes[(instance, self.key)]=appender > > then they append() to the appender, which operates on the > underlying data.
Sweet. And the UniqueAppender is useful here too- thanks for the pointer. The whole assemblage is very simple and fairly decoupled now- a mapper extension shuffles instances off to type-specific collections with position management mojo, and the mapped class accesses these via enhanced association proxies. Thanks! -jek --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
