Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] EclipseLinkM6 doesn't properly detect added/changed details

Yup, I stand corrected.

We're using mOXY and JPA and missed some mOXY 'setter' and indeed a
backreference.

Thanks - it's working now.
-J.

On Wed, 2008-05-07 at 06:14 -0700, James Sutherland wrote:
> 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 



Back to the top