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.


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

Reply via email to