Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Cascade Refresh on a ReadObjectQuery(CascadeAllParts and state data on a readObjectQuery)
Cascade Refresh on a ReadObjectQuery [message #1693533] Fri, 24 April 2015 19:41 Go to next message
ELUser Mising name is currently offline ELUser Mising nameFriend
Messages: 26
Registered: May 2013
Junior Member
We are migrating from TopLink to EclipseLink and not using JPA but are using the native TopLink APIs.

I have a ReadObjectQuery where I query by the primary key by using the query.setSelectionId().
I have query.shouldCascadeAllParts(), but my lazy loaded relationships and not loaded by the query.
I see stale data when I do the entity.getChildList.

How can the refresh of the lazy loaded lists be done?
We need the lazy loaded lists in a lot of are use cases to be updated.

Also in some cases I need the IndirectList to instantiated by the above query? How can this be achieved?


Thanks for the help.,
Re: Cascade Refresh on a ReadObjectQuery [message #1693690 is a reply to message #1693533] Mon, 27 April 2015 14:09 Go to previous message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
shouldCascadeAllParts() will cause any options set on the query to cascade to any queries to bring in relationships, but if you want a refresh to occur, you need to set it on the query. This is described in https://wiki.eclipse.org/Introduction_to_EclipseLink_Queries_(ELUG)#How_to_Refresh_the_Cache

Best Regards,
Chris
Previous Topic:Workbench not shiped in EclipseLink2.6
Next Topic:generate java model from mapping file
Goto Forum:
  


Current Time: Fri Apr 26 20:11:12 GMT 2024

Powered by FUDForum. Page generated in 0.03099 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top