On Jun 27, 9:10 pm, Martijn Faassen <[EMAIL PROTECTED]> wrote:
>
> So creating the Session class directly is the right way to go? I
> switched from using that to create_session when I found out about the
> existence of this function, but I can switch back.

well I think when you're calling create_session(), you're pretty much
getting Session back.  These days we have one "official" alternate
subclass of Session called ShardedSession, and sessionmaker()
introduces the idea of "ad hoc" Session subclasses.  It seems that if
you have your own "we make a Session for you" system, it would benefit
most by getting at the actual Session class so that supporting
alternate Session implementations and ad-hoc subclasses remain
straightforward.

The argument *for* create_session() is that SQLA in most cases uses
"facade functions" to create classes, except in the case of schema
elements.   Though sessionmaker() (which doesn't work for you) is the
official "facade" for Session 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to