-->
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.  [ 4 posts ] 
Author Message
 Post subject: Generate Hibernate Validator annotations AND JPA annotations
PostPosted: Tue Aug 26, 2008 2:24 pm 
Newbie

Joined: Thu Aug 21, 2008 7:54 pm
Posts: 12
We're using Hibernate tools to generate our JPA entity classes based on an existing / legacy database with several tables. We'd like to use the the Hibernate Validator for validation through our application.

That said, is there a way to have Hibernate tools generate both the standard JPA annotations AND the Hibernate Validator annotations on the generated entity classes? (i.e. @NotNull, @Max(value=) etc.)

I would imagine I'm not the first person to want this, but I couldn't seem to find other discussions about this. Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2008 5:10 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
seam uses hibernate-tools to add validator annotations.

See the custom .ftl templates in seam-gen if you want to do the same without seam-gen

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Generate Hibernate Validator annotations AND JPA annotations
PostPosted: Wed Aug 27, 2008 8:46 pm 
Newbie

Joined: Thu Aug 21, 2008 7:54 pm
Posts: 12
Thanks I will have a look at how they're doing it, appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 10, 2008 1:27 pm 
Newbie

Joined: Thu Aug 21, 2008 7:54 pm
Posts: 12
Just wanted to add that I also came across this post on the subject. Haven't tried it yet but found it helpful.

http://forum.hibernate.org/viewtopic.php?t=964381&highlight=default+annotations


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.