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

Bug 337427

Summary: Entity not properly removed from cache
Product: z_Archived Reporter: Adrian Goerler <adrian.goerler>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P2 CC: eclipselink.orm-inbox, konstantin.schwed, sabine.heider, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 336726    

Description Adrian Goerler CLA 2011-02-17 07:45:29 EST
In the testsuite eclipselink.jpa.wdf.tests, the test 

TestBidirectionalManyToMany.testDeleteNonSharedProject fails if caching is enabled (https://bugs.eclipse.org/bugs/attachment.cgi?id=188603). 

The test checks correct removal behaviour in a bidirectional m:m relationship between the enties Employee and Project.

The test removes the association between a Project and an employee and also removes the Project itself. After commit the removed project can still be found:

java.lang.AssertionError: project found
	at org.junit.Assert.fail(Assert.java:91)
	at org.junit.Assert.assertTrue(Assert.java:43)
	at org.eclipse.persistence.testing.framework.wdf.AbstractBaseTest.verify(AbstractBaseTest.java:317)
	at org.eclipse.persistence.testing.tests.wdf.jpa1.relation.TestBidirectionalManyToMany.testDeleteNonSharedProject(TestBidirectionalManyToMany.java:227)

The issue does not occur, if the cache is disabled.
Comment 1 Tom Ware CLA 2011-06-08 09:51:27 EDT
see also: bug  336731 and bug 337427
Comment 2 Tom Ware CLA 2011-08-12 11:02:51 EDT
Closing.  This test no longer fails when caching is enabled.  We have done several fixes to our protected relationship code in 2.3.1 and one of those fixes likely addresses this issue.

I have set the cache mode as set in the attachment, run the tests and checked in the change to the persistence.xml file.  All tests still pass.
Comment 3 Tom Ware CLA 2011-08-12 11:07:40 EDT
reopening... I missed a change.  'still investigating.
Comment 4 Tom Ware CLA 2011-08-23 09:46:43 EDT
Fix for 336726 fixes this

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