-->
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: hibernate validation
PostPosted: Wed Aug 28, 2013 12:12 am 
Newbie

Joined: Tue Aug 27, 2013 11:53 pm
Posts: 2
hi all,
I want to apply validation using single xml for the whole project.
As writing single xml for each entity class is hard to maintain and creates code duplication.
is there any way to do that ??
any suggestion will be appriciated.
thanks.


Top
 Profile  
 
 Post subject: Re: hibernate validation
PostPosted: Wed Aug 28, 2013 2:47 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
There is two different types of XML descriptors in Bean Validation. META-INF/validation.xml is a global descriptor which configures things such as the message interpolator to be used etc. Besides that, it references one or more constraint mapping files which describe the constraints to be applied. You can work with one such mapping file for all your entities or split it up just as you want, but you don't have to create a separate mapping descriptor per entity.

Hth,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


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.