openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <>
Subject [jira] Reopened: (OPENJPA-1787) Bean validation fails merging a new entity
Date Wed, 16 Mar 2011 02:17:29 GMT


Jeremy Bauer reopened OPENJPA-1787:

It looks like the hasPersistListeners and hasUpdateListeners methods in the VLEM are implemented
simply for the sake of consistency and, as far as I can tell, are not actually called within
OpenJPA.  Event type checking is all within the fireEvent method itself and testing shows
it to work as expected.  The hasDeleteListeners method (which is implemented correctly) does
get called by JDBCStoreQuery for specific in-memory operations.  For the sake of consistency,
and in the event that an external plugin may be calling these methods (they are public), I'll
check in the simple code fix and some additional test cases that further verify validation
is working as expected, based on the event type and specified validation group (or lack thereof).
 This JIRA will be used to make these changes.

> Bean validation fails merging a new entity
> ------------------------------------------
>                 Key: OPENJPA-1787
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jpa, kernel
>    Affects Versions: 2.0.1, 2.1.0, 2.2.0
>            Reporter: Oliver Ringel
>            Assignee: Jeremy Bauer
>            Priority: Critical
>             Fix For: 2.1.1, 2.2.0
>         Attachments: OPENJPA-1787_2.1.x.patch, OPENJPA-1787_jUnits_2.1.x.patch, com.example.TestEmployeeDAO.txt,
openjpa-1787.tar, testcase-openjpa-1787.tar
> The bean validation is not working correctly
> If you try to merge a new entity.
>         EntityManager em = entityManagerFactory.createEntityManager();
>         Person person = new Person();
>         person.setName("Oliver");                               // is annotated
>         person = em.merge(person);                            
> you get a ConstraintValidationException, although name is set. 

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message