ElementCollection Cannot Be Put To Cache When Lazy Loading Is Used (Doc ID 1453931.1)

Last updated on AUGUST 15, 2016

Applies to:

Oracle TopLink - Version 11.1.1.4.0 to 11.1.1.5.0 [Release Oracle11g]
Information in this document applies to any platform.

Symptoms

While using Toplink Grid with Grid Cache configuration, when ElementCollection is configured to use lazy loading, it is always fetched from database by EclipseLink and not
put to cache when the object is read repeatedly.

TopLink 11.1.1.4.0 that comes with WebLogic 10.3.4

Issue occurs with TopLink 11.1.1.4.0 Coherence 3.6.0.4 and Coherence 3.5.3

STACK TRACE / RELEVANT THREAD DUMP INFORMATION:


Following output generated while running the "java test.Test" multiple times, however for the first time I see two SQL's

[EL Fine]: Connection(20415955)--SELECT SHP_ID, SHP_DESCRIP, VERSION FROM SR_ECDB_SHIPMENT WHERE (SHP_ID = ?) bind => [1]
[EL Fine]: Coherence(Shipment)::Get: 1 result: null
[EL Fine]: Connection(20415955)--SELECT t0.CGO_NATURE FROM SR_ECDB_SHIPMENT_CARGNAT t0 WHERE (t0.SHP_ID = ?) bind => [1]

during the second/third iteration can see only the following SQL

[EL Fine]: Connection(23438274)--SELECT t0.CGO_NATURE FROM SR_ECDB_SHIPMENT_CARGNAT t0 WHERE (t0.SHP_ID = ?) bind => [1]

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms