]
Chris Wilson updated HV-76:
---------------------------
Attachment: HibernateValidatorFieldAnnotationsAndProxiesTest.java
This is still very much an issue with Validator 4.0.2 GA. See attached updated test case
which should only depend on Hibernate Annotations and Validator (change HibernateTestBase
to org.hibernate.test.annotations.TestCase to run against Hibernate Annotations source).
Field annotated member validators does not work with proxied
objects
---------------------------------------------------------------------
Key: HV-76
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-76
Project: Hibernate Validator
Issue Type: Bug
Components: legacy
Affects Versions: 3.0.0.ga, 3.1.0.CR1
Reporter: Lucien Weller
Fix For: 3.2.0
Attachments: HibernateValidatorFieldAnnotationsAndProxiesTest.java,
initialized-proxy-fix.patch, proxy-fix.patch, testcase.tar.gz
Copied from subtask HV-68 as subtask of closed issue HV-64 seams not to appear as open
issue):
May be annotating validation constraints on field level ist not the best solution, but by
now it's explicitly mentioned as a possibility without other indication of
restrictions in hibernate validator doc. But obviously this method is not safe with
hibernate proxy instances as it is demonstrated be test case attached to original issue
(
http://opensource.atlassian.com/projects/hibernate/secure/attachment/1409...).
My first patch was a quick fix that worked for our case and a agree once again that it may
have some side effects as it changes the semantic of field annotation. but my second
solution
(
http://opensource.atlassian.com/projects/hibernate/secure/attachment/1409...)
leaves every thing as it is and just handles proxy instances differently and produce a
more correct validation result than in current version.
I hope that you can do something with my ideas or a least document this limitation when
using field annotation.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: