On Jun 28, 2:32 pm, "Uwe C. Schroeder" <[EMAIL PROTECTED]> wrote:

> If I could figure out how, I probably would. The code from the docs doesn't
> work, because TG does something around that. I guess one of the major
> drawbacks of TG is it's documentation (or lack thereof) when it comes to
> using SA together with it. I guess that will change once TG uses SA by
> default.

my random guess is that they create a SessionTransaction, then they
forget about it.  if you then go and do some straight SQL like
select(foo).execute(), that goes against the engine, but that engine
needs to be set up explicitly within the SessionTransaction:

http://www.sqlalchemy.org/docs/unitofwork.html#unitofwork_transaction_sql

alternatively, you can pull out the connection straight from the
session and use that, via session.connection() - this also registers
the engine with the current transaction.

when using just the ORM for Query/flush(), the Session does this for
you when it first uses an engine while the transaction is present...so
it would seem like it "just works", when really it only "just works"
for ORM logic.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to