Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315040

Summary: Different behavior with ManyToMany relationship depending if weaving is used or not
Product: z_Archived Reporter: Sei Syvalta <syvalta>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: christopher.delahunt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Sei Syvalta CLA 2010-05-31 04:36:30 EDT
Build Identifier: 2.0.2.v20100323-r6872 and 2.1.0.v20100517-r7246

I have one-sided ManyToMany relation:

@ManyToMany
@JoinTable(name = "FOO_BAR")
private Set<Foo> bars = new HashSet<Bar>();

Entities has equals and hashcode methods implemented.

Adding a duplicate to the set works fine when weaving is not used. When weaving is used, a constraint violation is thrown from the DB because a duplicate mapping is tried to be inserted.

I would think the behavior is correct when weaving is not used. However, my biggest concern is the inconsistent behavior dependent on the weaving.


Reproducible: Always

Steps to Reproduce:
1. enable weaving
2. add duplicate entity to one-sided manytomany relation (did not test with two-sided)
3. commit: constraint violation occurs
Comment 1 Chris Delahunt CLA 2012-11-21 15:01:01 EST

*** This bug has been marked as a duplicate of bug 325035 ***
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:20:57 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink