Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337427 - Entity not properly removed from cache
Summary: Entity not properly removed from cache
Status: CLOSED DUPLICATE of bug 336726
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 336726
  Show dependency tree
 
Reported: 2011-02-17 07:45 EST by Adrian Goerler CLA
Modified: 2022-06-09 10:35 EDT (History)
4 users (show)

See Also:


Attachments

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