Hello Adam,
This seems to be a problem with TopLink calculating changes on the Master even though it is removed. Then attempting to merge those changes into the shared cache.
The workaround for now is to put a flush() in the code after the Slave is set on the Master.
--Gordon
-----Original Message-----
From: Adam Bien [mailto:abien_at_adam-bien.com]
Sent: Sunday, January 20, 2008 1:01 PM
To: persistence_at_glassfish.dev.java.net
Subject: Hi All
Hi All,
In my current project we run to a strange problem:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=4019.
Brief description: When I add an entity (Slave) to a persistent Master
and then remove the Master with EntityManager::remove the Master becomes
detached, but the Slave not.
It seems like the cascading mechanism doesn't work correctly in this case.
This causes Exceptions afterwards,
regards,
adam
--
Consultant, Author, Java Champion
Homepage: www.adam-bien.com
Weblog: blog.adam-bien.com
eMail: abien_at_adam-bien.com
Mobile: 0049(0)170 280 3144
Books: Enterprise Architekturen (ISBN: 393504299X),
Java EE 5 Architekturen (ISBN: 3939084247),
J2EE Patterns, J2EE Hotspots, Enterprise Frameworks and Struts