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: 1289
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:SQL Exception not being caught
Next Topic:TableGenerator - Sequence/ID Generation
Goto Forum:

Current Time: Sun Mar 25 01:51:03 GMT 2018

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

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