-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Validate an entire object
PostPosted: Mon Jun 22, 2009 4:35 pm 
Newbie

Joined: Wed Jun 22, 2005 6:33 pm
Posts: 8
I'm starting to do some simple validation. I see how to add annotations to individual properties, and how to add new annotations that would be useful across multiple objects. But I need to validate the entire state of an object. The first test is the uniqueness of an object on a database. This is not limited to a single field, rather multiple.

I tried creating a new validation method on the class, and put an @AssertTrue on it. But I think hibernate is treating that like it's a property rather than simply a validation method.

Is there a good way to validate an entire object when it's saved, rather than individual fields?

Thanks,

Norman


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.