You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Oliver Probst (JIRA)" <ji...@apache.org> on 2013/06/14 12:45:20 UTC
[jira] [Updated] (OPENJPA-2398) Bean Validation: Referenced entity
throws PersistenceException
[ https://issues.apache.org/jira/browse/OPENJPA-2398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Probst updated OPENJPA-2398:
-----------------------------------
Description:
The descirption of Bean Validation mentions:
"Notice the use of the @Valid annotation. ... Referenced entities and collections of entities are validated separately in order to prevent circular validation."
If a referenced entity contains a constraint (e.g. @NotNull) and the owner class which references the entity does not use the @Valid constraint, the entity is validated (which is correct) but does throw a PersistenceException containing a ConstraintViolationException and not directly a ConstraintViolationException. Is this behaviour correct according to the spec?
was:
The descirption of Bean Validation mentions:
"Notice the use of the @Valid annotation. ... Referenced entities and collections of entities are validated separately in order to prevent circular validation."
Running a
> Bean Validation: Referenced entity throws PersistenceException
> --------------------------------------------------------------
>
> Key: OPENJPA-2398
> URL: https://issues.apache.org/jira/browse/OPENJPA-2398
> Project: OpenJPA
> Issue Type: Bug
> Components: validation
> Affects Versions: 2.2.2
> Environment: Windows 7, Eclipse Juno, Hibernate Validator 5, MySQL
> Reporter: Oliver Probst
> Priority: Minor
>
> The descirption of Bean Validation mentions:
> "Notice the use of the @Valid annotation. ... Referenced entities and collections of entities are validated separately in order to prevent circular validation."
> If a referenced entity contains a constraint (e.g. @NotNull) and the owner class which references the entity does not use the @Valid constraint, the entity is validated (which is correct) but does throw a PersistenceException containing a ConstraintViolationException and not directly a ConstraintViolationException. Is this behaviour correct according to the spec?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira