-->
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 Validator less-than VS less-than-or-equal-to
PostPosted: Tue Nov 01, 2005 4:27 pm 
Newbie

Joined: Thu Apr 14, 2005 6:58 am
Posts: 1
I'm using Hibernate Annotations 3.1 beta 6 in conjunction with Hibernate 3.1 rc1.

Section 3.1.2 of the Annotations doc describes min, max, and range validation constraints as if the legal values falls between the min and max but does not include the min or max.

The source code for the Range, Min, and Max Validators and the associated JavaDocs clearly do "<=" instead of "<" and do include the ends of the range in the legal interval.

However, the DDL which is generated for Postgres 8.0.4 adds a constraint to the table which uses "<" instead of "<=".

So, in memory calls using the ValidatorClass will succeed when the value of a property equals min or max but then will throw an SQL constraint violation when it is actually committed to the database.

I found no reference to this problem when searching the forums and newsgroups and could not get to CVS (some sourceforge error about a bad gateway) to see if this problem has been fixed.

Is anyone else experiencing this?

Thanks,
Aaron


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 01, 2005 6:01 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
sounds like a candidate for a jira issue.

_________________
Max
Don't forget to rate


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.