[
http://opensource.atlassian.com/projects/hibernate/browse/HV-360?page=com...
]
Hardy Ferentschik commented on HV-360:
--------------------------------------
I am not sure if I follow. The idea behind the JPA aware resolver is that you don't
have to validate data which is still in the db. If it is persisted it should have been
validated and hence be valid. The only reason to validate again would be that another
application could have modified the data (bypassing validation). If so turning of lazy
loading might be an option.
{quote}
However, I'm wondering if the DefaultTraversableResolver.isReachable() can be enhanced
to return true for validations with group other than Default.
{quote}
What has this to do with groups?
Can you give an example/testcase of what you are talking about?
DefaultTraversableResolver.isReachable() should be enhanced to return
true for validations with group other than Default
------------------------------------------------------------------------------------------------------------------------
Key: HV-360
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-360
Project: Hibernate Validator
Issue Type: Improvement
Components: engine
Affects Versions: 4.1.0.Final
Reporter: Georges-Etienne Legendre
Assignee: Hardy Ferentschik
We use Bean Validator to validate transition between domain object states. We use groups
to allow different validations for each state. When we want to change the state of an
object, we get the object from the database (using JPA). However, because we use LAZY
loading, only the loaded beans get validated. This causes problems because nothing is in
fact validated (other than the first bean of course).
I know the JSR tells that the default TraversableResolver should verify if JPA is in the
classpath. However, this doesn't make sense when groups are used for the purpose
described above. There are 2 workarounds:
* Disable LAZY loading!
* Implement a TraversableResolver that returns true for isReachable()
However, I'm wondering if the DefaultTraversableResolver.isReachable() can be
enhanced to return true for validations with group other than Default.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira