On Tuesday, July 12, 2016 at 1:11:30 AM UTC-4, Mike Orr wrote:

8. If you don't want to use the ORM, you can make a request property 
> that returns an engine or connection (#2, #3, #4, #5). I don't know 
> whether you could register that with Pyramid's transaction manager; 
> you'd probably have to use a 'zope.sqlalchemy' class or write your own 
> adapter. But you don't have to use the transaction manager. 
>

as a variation on this... If you setup the ORM you can work directly with 
the dbSession's connection (using core, the underlying cursor, etc), and 
all that work will happen within the pyramid_tm transaction

however, sqlalchemy won't know that you did anything since you bypassed it. 
 you need to import `mark_changed` from zope.sqlalchemy and then do 
`mark_changed(dbSession)`.  otherwise the default rollback will issue 
instead of a commit.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/5ff46fc9-7933-4493-8030-86d476af083a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to