openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Bauer (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-1787) Bean validation fails merging a new entity
Date Tue, 15 Mar 2011 16:47:29 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jeremy Bauer resolved OPENJPA-1787.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.0
                   2.1.1

Great!  I'm glad it fixed the problem.  I just checked the code into the 2.1.x stream as well.

Yes, the has*Listeners methods in the VLEM do look suspect.  Thanks for reporting it.  I'll
do some verification and will open a new JIRA if it turns out to be a bug.  I'm about 99%
certain it is...  Both pre-persist and pre-update validation are enabled by default.  So,
the bug will not surface unless non-default validation groups are specified.  Looks like we
are missing a test variation or three.

> Bean validation fails merging a new entity
> ------------------------------------------
>
>                 Key: OPENJPA-1787
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1787
>             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");                               // Employee.name is annotated
@NotNull 
>         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: http://www.atlassian.com/software/jira

Mime
View raw message