Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336741 - Removed entity obtained with getRefrence is not removed from cache
Summary: Removed entity obtained with getRefrence is not 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-09 12:55 EST by Adrian Goerler CLA
Modified: 2022-06-09 10:26 EDT (History)
5 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-09 12:55:56 EST
The following sequence fails for cacheable entities:

Object ref = em.getRefrerence(MyCacheableEntity, id)
em.remove(ref);
em.getTx().commit();
em.clear();

assertNull(em.find(MyCacheableEntity, id));

Its seams that the reference is not removed from the cache. If i disable caching, the above sequence succeeds.

The issue can be reproduced by 

eclipselink.jpa.wdf.test
- org.eclipse.persistence.testing.tests.wdf.jpa1.entitymanager.TestGetReference
  - testRemove

As a prerequisite caching must be enabled (selectively): https://bugs.eclipse.org/bugs/attachment.cgi?id=188603
Comment 1 Tom Ware CLA 2011-06-08 09:52:51 EDT
see also: bug  336731 and bug 336741
Comment 2 Tom Ware CLA 2011-08-23 09:46:22 EDT
Fix for 336726 fixes this.

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