tienes que remover la anotacion @Length, esta es solo para Strings.
Yes, removing the annotation solves the problem, but is it a bug of hibernate tools? The application created by seam-gen is not ready to use.
The application created by seam-gen is not ready to use.
Right, it is a starting point, not a readymade production application.
Gavin, I appreciate your point that what seam-gen should not be deemed production ready. However, you should at least be able to perform an insert. With this annotation on the char property, the validator fails. Now, arguably the validator should not fail because a char is in fact a length of 1, but right now seam-gen has to deal with that (I guess) until Hibernate is fixed.
Where is the upstream bug report? I will be looking for it in the meantime.
You know, as I contemplate this, I realize that whose court it belongs is a toss up. The LengthValidator returns false if the property is not a String. On the other hand, a char can only be length 1 or null. So it is a pointless validation in this case. I think the right step is for seam-gen to not put this annotation. (I can be persuaded though. It's not my project).
Okay, I have submitted an issue and suggested change for the Hibernate Validator. After all, java.lang.Character does satisfy @Length(max = 1). What is valid is valid. Stupid, but valid. I rest my case.
Gavin, I appreciate your point that what seam-gen should not be deemed production ready.
Sorry, that should read "what seam-gen creates should not necessarily be sent straight to production."