Last updated on JUNE 25, 2014
Applies to:Oracle TopLink - Version 18.104.22.168.0 and later
Information in this document applies to any platform.
Toplink queries not returning the correct data in the current version of Toplink. The functionality worked correctly in Toplink 10.1.3.4.
This issue stopped working when upgrading to Toplink 12.
Here is technical summary of the issue extracted from the bug Test Case
The line that states 'Retrieving children by Parent IDFR:' is printed
right before the TstChild object is retrieved from the database based on its
After both TstChild objects are retrieved, the TstParent object is
obtained through the one-to-one mapping back to the parent. The parent
idfr is then compared to the idfr that is passed in as an argument
to the query.
When using TopLink 10g we see that the TstChild retrieved always
matches the expected one. However, when using TopLink 12c the
second TstChild retrieved is the same one as the first one retrieved.
Note: InMemoryQueryIndirectionPolicy is configured to throw an indirection exception
Stepping through the EclipseLink code it looks like in
while checking the cache on the second query that there is code present that
if 'Conform Results in Unit of Work' is enabled and the
InMemoryQueryIndirectionPolicy is not
SHOULD_TRIGGER_INDIRECTION it changes the policy to
Eventually IdentityMapManager.getFromIdentityMap is invoked where it attempts
go through the elements in the cache looking for the element in the query.
doesConform against the already read back TstChild object a
exception is thrown (since the TstChild.getParent() method has not yet been
invoked initializing the Value
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms