cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Rollbacks and Listeners
Date Mon, 09 Aug 2010 15:28:16 GMT

On Aug 9, 2010, at 6:08 PM, Bruno René Santos wrote:

> I have been analyzing the behaviour of the commitChanges lifecycle  
> and inferred
> that only when all database operations that are contained on the  
> current context
> are successfully performed do the post... callbacks are called.

Correct.

> So if you have
> like 4 inserts on the context and one of them raises an exception  
> (because
> violates an unique constraint for example), none post-persist  
> callbacks for the
> other 3 inserts is called. Is that correct?

Correct. None of the post* callbacks will be invoked if transaction  
failed.

Andrus
Mime
View raw message