Hello!

I'm working on a project where I use Pyramid together with Cornice to 
provide a REST-API. When I do a PUT-request, I would like to return the 
updated resource in the Response. But as the COMMIT only happens after 
returning the Response and request.dbession.commit() is not allowed in the 
default configuration (SQLAlchemy-scaffold - "Transaction must be committed 
using the transaction manager"), I'm wondering how I could return the 
resource with the latest DB-State after updating it with the PUT-payload.
Using a GET right after a successful PUT is my current solutions, but that 
feels like an unclean workaround.

Is there a way to do this without replacing the whole 
transaction-mechanism, which seems complex?

Kind regards,
Christian

-- 
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/bf41d803-9375-445e-a903-a767d507bab9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to