Relationship In Embeddable Fails When Shared Cache Is Disabled

(Doc ID 1448949.1)

Last updated on MAY 31, 2012

Applies to:

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


- The Entity Object Model is the following :
 One Entity (Publisher) has an embedded object  (Address) .
And Address has a OneToOne mapping to entity City.
 - In persistence.xml file the "eclipselink.cache.shared.default" property is set to false :
<property name="eclipselink.cache.shared.default" value="false" />


-  When "eclipselink.cache.shared.default" property is set to false, any relationship from an Embedded to a non-shared Entity
will trigger a validation exception :


Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:

Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.2.v20100323-r6872): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Address must not reference the
isolated class model.City.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[city]
Descriptor: RelationalDescriptor(model.Address -->


This issue happens against Toplink .



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