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 can I handle validation exception?
Date Wed, 11 Mar 2009 13:06:04 GMT

On Mar 11, 2009, at 11:01 AM, Νίκος Παράσχου wrote:

> Is there any way to do something like the following:
>
> try {
> 	context.commitChanges();
> }
> catch(Some ValidationException thrown earlier) {
> 	// Get failures list and print error messages.
> }

This is how it should be done, and this works for me at least. Not  
sure why it does not work for you. Can you doublecheck that  
validatingObjectsOnCommit is actually true and there are changes in  
the context?

Andrus
Mime
View raw message