users@glassfish.java.net

Re: Glassfish Caching OneToMany Relations

From: <glassfish_at_javadesktop.org>
Date: Wed, 30 Apr 2008 12:47:18 PDT

Your response helped me find my bug.

The original creation of entities "A" and "B", and the [bidirectional] relations between them, was being done correctly.

However, some later code was mistakenly null-ing the relation between "B" to "A", hence the many side was broken.

The confusing aspect was that Glassfish/TopLink apparently cached the original, correct relations between "A" and "B", even though the later code null-ed half of the relation. That's why the query succeeded in traversing "A" to "B" until Glassfish/TopLink was stopped and restarted.

Many thanks.
[Message sent by forum member 'franknatoli' (franknatoli)]

http://forums.java.net/jive/thread.jspa?messageID=272295