My Oracle Support Banner

ECLIPSELINK-00195 With Embeddeds Even With eclipselink.cache.shared.default Is False (Doc ID 1093720.1)

Last updated on MARCH 19, 2019

Applies to:

Oracle TopLink - Version and later
Information in this document applies to any platform.


JPA Embeddeds are always set to shared=true (isolated=false) and do not pick up defaults or their parent's shared setting. They should probably inherit the isolation of their parent at all times. When eclipselink.cache.shared.default is set to false, any relationship from an Embedded to a non-shared Entity will trigger a validation exception.

Entity Object Model

Publisher references Embeddable Address
Address has a OneToOne mapping to City

The persistence.xml defines:

<property name="eclipselink.cache.shared.default" value="false" /> 

Problem Scenario