On Dec 12, 2007, at 10:07 AM, Chris M wrote:
> > On further consideration of the interface, what about adding two new > keywords to options() - mapper, and id? That way someone with a large > group of options to set won't have to type the entity name and/or id > on every single option. > > session.query(Class).options(<options for main > entity>).options(<options for other entity>, mapper=SomeClass, > id="class1") thats OK, except it starts getting into more than one way to do it territory. also i wonder if there would someday be some option that doesnt apply to any particular mapper. theres an implementation reason also that very much favors the mapper- embedded-in-the-option approach, which is that the options on the query get re-used on an entirely different query when lazy and deferred loaders load their results. the original query could bundle the options with the mappers sure but at the moment its a little simpler than that (and i really am trying to not complicate things these days....) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---