On 6/1/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
>
> On Jun 1, 11:37 am, Christoph Haas <[EMAIL PROTECTED]> wrote:
> > sooner or later. Am I right that we are just talking of
> >
> >     john = session.query(User).get_by(name="john")
> >
> > versus
> >
> >     john = User.get_by(name="john")
> >
>
> well assign_mapper gives you the *huge* advantage that you can forget
> about the session in most cases, since its applying a SessionContext
> to all operations, including construction, etc.  thats the reason i
> find myself using it sometimes, it eliminates the need for all those
> session.save() operations etc.  so User.query().etc is definitely less
> effort since you dont have to find your session.
>
> the elixir crew's +1 on having just query() is compelling since theyre
> the leading consumers of assignmapper.

To get this straight, this was my personal opinion, not the one from
the whole "elixir crew". The other option which was discussed was to
get rid of assignmapper altogether (in favor of defining the methods
on our base class so that people can override those in their own
classes ). No final decision was taken on this issue yet.
-- 
Gaƫtan de Menten
http://openhex.org

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to