Skip to main content



      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 06:09 Go to next message
Eclipse UserFriend
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 14:54 Go to previous message
Eclipse UserFriend
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: Tue Jul 01 01:42:13 EDT 2025

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

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

Back to the top