Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315040 - Different behavior with ManyToMany relationship depending if weaving is used or not
Summary: Different behavior with ManyToMany relationship depending if weaving is used ...
Status: CLOSED DUPLICATE of bug 325035
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 04:36 EDT by Sei Syvalta CLA
Modified: 2022-06-09 10:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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