-->
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: Using Validator on Classes Generated by Hibernate Tools
PostPosted: Tue Aug 21, 2007 4:14 pm 
Newbie

Joined: Tue Aug 21, 2007 3:31 pm
Posts: 4
Although I've seen several similar topics posted, the best-practice solution still isn't clear to me.

My use-case:

I'm using a JDBC helper library to persist some large objects whose class definitions were generated by Hibernate Tools from an existing database.


What I'd like to do:

At the application-level, I'd like to use Hibernate Validator to validate the objects using the validation constraints generated by Hibernate Tools.


Problem:

Hibernate Tools seems to only generate @Column annotations for the class properties, which don't appear to be recognized by Hibernate Validator as validation constraints.


Questions:

1. Should I create my own custom Hibernate Validator constraint handler for the @Column annotation?

2. Is there a way to get Hibernate Tools to generate Hibernate Validator-style constraints?

3. Am I totally missing something?


Thank you.

- Jim


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 2:38 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
technically speaking you cannot do 1.
I don't know if tools allow 2, that could be a nice add on

_________________
Emmanuel


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.