-->
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.  [ 2 posts ] 
Author Message
 Post subject: Validating collections
PostPosted: Sun Mar 21, 2010 7:30 am 
Newbie

Joined: Sun Mar 21, 2010 7:18 am
Posts: 1
Hi, I want to validate a bean which has a field of type hashmap.
I want that when validating the hashmap each of it's entry will be validated.

example:
Code:
public class MyBean{
      Map<Integer, InnerBean> myMap;
}


How do I do that? Must I implement a constraint of my own?


Top
 Profile  
 
 Post subject: Re: Validating collections
PostPosted: Tue Mar 23, 2010 12:38 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Use @Valid

Code:
public class MyBean{
      @Valid
      Map<Integer, InnerBean> myMap;
}


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

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.