I am using hibernate annotations and it's validator, which is really usefull.
On one property I have the following annotations:
@NotNull @length(min = 1)
When I set this property to null I get:
org.hibernate.PropertyValueException: not-null property references a null or transient value
When I set this property to "" I get a:
org.hibernate.validator.InvalidStateException: validation failed for:
From a hibernate user's perspective, both are validation exceptions, only because not null of table schema is checked before the validations, the not null doesn't give a InvalidStateException too.
But it should, shouldn't it?
_________________ http://www.ohloh.net/accounts/ge0ffrey
|