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
|