Skip to main content

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 CommengeFriend
Messages: 1
Registered: November 2013
Junior Member

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 DelahuntFriend
Messages: 1356
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 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: Sat Jun 06 05:05:16 GMT 2020

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

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

Back to the top