Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Retrieve object and dependencies with only one SQL request
Retrieve object and dependencies with only one SQL request [message #1173204] Wed, 06 November 2013 11:09 Go to next message
Rudy Commenge is currently offline Rudy Commenge
Messages: 1
Registered: November 2013
Junior Member
Hi,

When I retrieve only one object, several sql requests are sent by EclipseLink.
There are one parametrized request by object which depends on my main object.

Can I configure EclipseLink in order to generate only one sql query when I retrieve an object and its dependencies ?

Kind regards.
Re: Retrieve object and dependencies with only one SQL request [message #1173841 is a reply to message #1173204] Wed, 06 November 2013 19:54 Go to previous message
Chris Delahunt is currently offline Chris Delahunt
Messages: 1021
Registered: July 2009
Senior Member
Yes. EclipseLink will issue the query to bring in the requested object, and if it is not in the cache already, will build it based on your mappings. Depending on how those mappings are configured, it may take queries to other tables to bring in referenced objects. You can configure your mappings to use joining or batch reading to fetch those related objects, or more commonly, use indirection so that they are only fetched when accessed. See http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_%28ELUG%29#How_to_Use_Batch_and_Join_Reading_for_Optimization for optimizations that can be used.
Previous Topic:[Solved] Eclipselink 2.5 + MSSQL (jtds) escaping table names
Next Topic:Why are you not using java.util.concurrent classes?
Goto Forum:
  


Current Time: Wed Sep 17 17:40:12 GMT 2014

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

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