cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: How to integrate a stored procedure call with commitChanges or cayenne transaction ?
Date Mon, 07 May 2018 06:33:02 GMT
You should be able to run Cayenne commit and a stored procedure in the same DB transaction
(either via lifecycle events or manual transaction API), but unfortunately it is not possible
to preserve the object state on rollback. 

Maybe we should think about such scenario in the future. I can see it being useful...

Andrus


> On May 6, 2018, at 6:20 PM, Juan Manuel Diaz Lara <jmdiazlr@yahoo.com.INVALID>
wrote:
> 
> The purpose is to use db stored procedures to do the post-processing of my object graph,
something like (seudo-code);
> 
> start cayenne transaction
>      cayenne commitChanges();
>      call stored procedure/function to post-process (heavy process).
> commit cayenne transaction
> 
> I would be nice that if stored procedure fails then object graph remains in the state
just before transaction started (at least the persistence state).
> 
> 
> Atte. Juan Manuel Díaz Lara


Mime
View raw message