openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1787) Bean validation fails merging a new entity
Date Mon, 13 Sep 2010 13:05:32 GMT


Donald Woods commented on OPENJPA-1787:

So after looking at your example, I'm not sure why you opened a JIRA....
You're using Hibernate Validator 4.0.2.GA, which we support.
The is marked with @NotNull.
But in your code snippet above, you are setting the Name, so what is the behavior you're expecting?
 @NotNull should only throw an exception if you didn't call setName() before trying to merge/persist
the entity.....

> Bean validation fails merging a new entity
> ------------------------------------------
>                 Key: OPENJPA-1787
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: validation
>    Affects Versions: 2.0.1, 2.1.0
>         Environment: Ubuntu 10.04, Spring 3.0.3
>            Reporter: Oliver Ringel
>         Attachments: openjpa-1787.tar
> The bean validation is not working correctly, if you try to merge not existing entity.
>         Employee employee = new Employee();
>         employee.setName("Oliver");                               // is
annotated @NotNull 
>         employee = em.merge(employee);
> em.persist and em.merge together with a managed entity is working as expected.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message