-->
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: Validator annotations not firing
PostPosted: Wed Dec 16, 2009 11:46 am 
Newbie

Joined: Wed Dec 16, 2009 11:37 am
Posts: 1
Hi all, I am attempting to use hibernate validator annotations on a simple integer field. I believe I have all necessary files wired into my project correctly though a simple annotations (such as @Range() ) does not seem to fire. A code snippet is below. I am using the eclipse IDE, and it does not throw any syntax errors so I also want to believe my imports are correct also. Can anyone think of a reason why the validator annotations would not fire? Thanks.




@Column(name = "myNumber")
@Basic(fetch = FetchType.EAGER)
@XmlElement
//@DisjointRange
@Range(min=1, max=10)
private Integer myNumber;


Top
 Profile  
 
 Post subject: Re: Validator annotations not firing
PostPosted: Wed Dec 16, 2009 2:35 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

which version of Hibernate Validator are you using and in which context? Are you using it in conjunction with Hibernate Core 3.5? Only the 3.5 releases contain the even listener registration code needed to validate entities as part of session events?
How does your session code look like?

--Hardy


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.