Issue Type: Bug Bug
Affects Versions: 4.2.0.CR1
Assignee: Unassigned
Attachments: com.example.jpa.validator.zip
Components: entity-manager
Created: 22/Feb/13 6:00 AM
Description:

While trying to persist an entity with:

  • an id generated with strategy GenerationType.TABLE
  • a field annotated with @javax.validation.constraints.NotNull
  • a null value for that field

I was expecting that:

  • the entityManager.persist() throws a javax.validation.ConstraintViolationException
  • the transaction to be marked as rollback-only
    (Those expectations are based on jpa 2.0 specifications)

But the current behavior is:

  • entityManager.persist() don't throw any exception
  • transaction is not marked as rollback only
  • later, the transaction.commit() throws a RollbackException

Remarks:

Environment: Hibenate 4.2.0-RC1
HibernateValidator 4.3.1.Final
H2 in memory database 1.3.170
Project: Hibernate ORM
Labels: jpa2 hibernate validation
Priority: Major Major
Reporter: Benoit Mangez
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