Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Documentation for refresh.cascade query hint(Can someone explain to me what the various options do, exactly?)
Documentation for refresh.cascade query hint [message #1840407] Wed, 14 April 2021 16:05 Go to next message
WARREN WEIS is currently offline WARREN WEISFriend
Messages: 8
Registered: April 2021
Junior Member
I found the following query hints for the refresh.cascade query hint, but I'm having a hard time finding a good explanation of the implications of choosing one over another.

The best hit I found was at
https://docs.oracle.com/middleware/1212/toplink/TLJPA/q_refresh_cache.htm#TLJPA1056


Table 4-37 Valid Values for eclipselink.refresh.cascade
Value	                                          Description
CascadeAllParts	                 Cascade to all associations.
CascadeByMapping	         Cascade by mapping metadata.
CascadePrivateParts	         Cascade to privately-owned relationships.
NoCascade	                         Do not cascade.



The NoCascade option is clear to me, but the others are not.

Re: Documentation for refresh.cascade query hint [message #1840569 is a reply to message #1840407] Mon, 19 April 2021 14:02 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
These are with the EclipseLink (TopLink) api. Since this is applied to queries, the CascadeAllParts tells it to apply the current operation (write, refresh etc) to the entire object graph it is given, ignoring any cascade options set on individual mappings.
CascadeByMapping is the default in JPA queries, and has the query look at the object graph and traverse it, letting the mappings decide if it should cascade the operation further or not.
CascadePrivateParts is more restrictive and only looks at what are known as private mappings (aka embedded in JPA), and will only cascade to those mappings from the base object in the query, regardless of mapping settings.

Best Regards,
Chris
Re: Documentation for refresh.cascade query hint [message #1840571 is a reply to message #1840569] Mon, 19 April 2021 15:16 Go to previous messageGo to next message
WARREN WEIS is currently offline WARREN WEISFriend
Messages: 8
Registered: April 2021
Junior Member
Thank you, Chris
Re: Documentation for refresh.cascade query hint [message #1840572 is a reply to message #1840571] Mon, 19 April 2021 15:16 Go to previous message
WARREN WEIS is currently offline WARREN WEISFriend
Messages: 8
Registered: April 2021
Junior Member
Thank you, Chris
Previous Topic:Trying to send array of objects on json
Next Topic:DYNAMIC ENTITY SERIALIZATION ISSUE
Goto Forum:
  


Current Time: Thu Mar 28 15:23:47 GMT 2024

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

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

Back to the top