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 
> <[email protected]> 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

Reply via email to