[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5540) Using a javax.validation.constraints.NotNull constraint on a ManyToMany relation causes an AssertionFailure if the relatated entity also contains a ManyToMany relation to a third entity

Jan Viaccava (JIRA) noreply at atlassian.com
Wed Sep 8 12:00:19 EDT 2010


Using a javax.validation.constraints.NotNull constraint on a ManyToMany relation causes an AssertionFailure if the relatated entity also contains a ManyToMany relation to a third entity
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HHH-5540
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5540
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.5, 3.5.1
         Environment: hibernate 3.5.1-final and hibernate 3.5.5.final
on oracle 10g
            Reporter: Jan Viaccava
         Attachments: hibernatebug.zip

update on an entity with a javax.validation.constraints.NotNull constraint on a ManyToMany relation causes an AssertionFailure if the relatated entity also contains a ManyToMany relation to a third entity and all relations have the fetchtype lazy. 

Here is the given entity structure:
@Entity class A {
   String textA;

   @NotNull
   @ManyToMany
   Set<B> b;
}
@Entity class B {
   String textB;

   @NotNull
   @ManyToMany
   Set<C> b;
}
@Entity class A {
   String textC;
}

this pseudocode causes the error:
startTransaction
A myA = find(A.class,1);
myA.setText("newText");
commit

See the attached testcase for more details


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list