|Re: [eclipselink-users] EclipseLinkM6 doesn't properly detect added/changed details|
My guess is that when you import the data you are not setting both sides of the relationship. Perhaps you are inserting details that set their master, but never add the detail to the master. In JPA you must always maintain both sides of a bi-directional relationship. See, http://en.wikibooks.org/wiki/Java_Persistence/Relationships EclipseLink maintains a shared cache by default, so after the import your out of synch objects are in the shared cache. The correct solution is to fix your import, but you can refresh an object from the database through refresh() and you should then see the details. Also you could disabe the shared cache through the "eclipselink.cache.shared.default"="false". Jan Vissers wrote: > > Hi, > > I'm hitting a serious issue using EclipseLinkM6. Our application > declares a master|detail relationship between families and products. > Data gets loaded asynchronously via Quartz which uses EclipseLink > EntityManager's. What we're seeing is that after a successful import the > master records show up in the application, but drilling down on the > details doesn't show any details. An actual database query tells us that > there *are* details available. Now when we restart our container > (Tomcat6) and revisit the master|detail forms, the details *do* show up > nicely. This behavior is the same for a pooling datasource em, as well > as for a non-pooling, non-datasource em. What I find strange is that the > master records do show up, but the details only after container restart. > > My guess is that EclipseLink doesn't properly detect changed > associations. Please tell me it isn't so - and that we're doing > something wrong. > > Thanks, > -J. > ----- --- http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland http://www.eclipse.org/eclipselink/ EclipseLink , http://www.oracle.com/technology/products/ias/toplink/ TopLink Wiki: http://wiki.eclipse.org/EclipseLink EclipseLink , http://wiki.oracle.com/page/TopLink TopLink Forums: http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , http://www.nabble.com/EclipseLink-f26430.html EclipseLink Book: http://en.wikibooks.org/wiki/Java_Persistence Java Persistence -- View this message in context: http://www.nabble.com/EclipseLinkM6-doesn%27t-properly-detect-added-changed-details-tp17099372p17104616.html Sent from the EclipseLink - Users mailing list archive at Nabble.com.
Back to the top