persistence@glassfish.java.net

caching bug?

From: Jeffrey Blattman <jeffrey.blattman_at_gmail.com>
Date: Thu, 09 Aug 2007 18:32:47 -0700

i have entity A that has a collection of entities C

/public class A ...
  private List<C> cs = ...
/
so i do an em.remove(C.class, cid). now i want to verify that the C with
ID cid is removed. so i do:

/C c = em.find(C.class, cid);
/
this returns null, as expected. now i do this ...

/A a = em.find(A.class, ...);
List<C> cs = a.getCs();
/
and i page through the cs collection, i find that the C with ID cid
still exists. all of the above em.* operations are done in separate
transactions. is this a caching bug? i can provide a test case if
necessary.