My Oracle Support Banner

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 to [Release Oracle11g]
Information in this document applies to any platform.


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 that comes with WebLogic 10.3.4

Issue occurs with TopLink Coherence and Coherence 3.5.3


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]


To view full details, 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 a vibrant support community of peers and Oracle experts.