Bug 232063 - Relationships between JPA 2.0 Cachable(false) and Cachable(true) Entities should be supported
Summary: Relationships between JPA 2.0 Cachable(false) and Cachable(true) Entities sho...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL: http://wiki.eclipse.org/EclipseLink/D...
Whiteboard:
Keywords: performance
: 205502 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-14 09:11 EDT by Tom Ware CLA
Modified: 2022-06-09 10:20 EDT (History)
12 users (show)

See Also:


Attachments
Eclipse project with reproduction (10.74 KB, application/x-zip-compressed)
2010-03-05 14:59 EST, Shaun Smith CLA
no flags Details
Intial Pre-Review patch (557.59 KB, patch)
2010-11-24 12:11 EST, Gordon Yorke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Ware CLA 2008-05-14 09:11:12 EDT
Isolated caches in EclipseLink can be used for several things.  The initial design was to enable VPD support for Oracle. As a result, the default setting makes the cache "completely isolated".  This means that objects outside the isolated cache cannot reference objects inside the isolated cache.

Another use for this setting is to simply avoid storing objects in the shared cache.  When using isolated caches in this way, it is desirable to be able to set it on an Enity-by-entity basis and have some Entities stored in the isolated cache and some stored in the shared cache.

We should add a cache setting that allows this scenario.  GlassFish bug 5012 provides and example of a user that needs this functionality.
Comment 1 Doug Clarke CLA 2008-07-07 13:33:18 EDT
Changed version to unspecified
Comment 2 Tom Ware CLA 2009-04-16 11:01:02 EDT
Updating priority due to revised bug categorization process.  See the following page for details:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines#Priority_and_Target_Milestone 

If you feel the updated priority is incorrect, please send an email to eclipselink-users@eclipse.org.
Comment 3 Shaun Smith CLA 2010-03-05 14:59:32 EST
Created attachment 161177 [details]
Eclipse project with reproduction
Comment 4 Shaun Smith CLA 2010-03-05 15:02:03 EST
I've renamed this bug to frame it in terms of JPA 2.0 requirements.  Fixing this bug will probably resolve the bug as originally stated.

EclipseLink's restrictions regarding relationships between shared cached and not shared cached (isolated) entities are applied to JPA 2.0 entities that are cacheable and not cachable.  The example below with throw a validation exception.  If both entities are cachable true or both false, there's no exception.

It should be possible to mix Cachable(true) with Cachable(false) entities.

Reproduction attached.

@Entity
@Cacheable(true)
public class Publisher implements Serializable {
    @OneToOne
    private Address address;
...
@Entity
@Cacheable(false)
public class Address implements Serializable {


[EL Info]: property eclipselink.jdbc.user is deprecated, property javax.persistence.jdbc.user should be used instead.
[EL Info]: property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdbc.driver should be used instead.
[EL Info]: property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.url should be used instead.
[EL Info]: property eclipselink.jdbc.password is deprecated, property javax.persistence.jdbc.password should be used instead.
[EL Config]: The access type for the persistent class [class model.Address] is set to [FIELD].
[EL Config]: The access type for the persistent class [class model.Publisher] is set to [FIELD].
[EL Config]: The target entity (reference) class for the one to one mapping element [field address] is being defaulted to: class model.Address.
[EL Config]: The alias name for the entity class [class model.Address] is being defaulted to: Address.
[EL Config]: The table name for entity [class model.Address] is being defaulted to: ADDRESS.
[EL Config]: The column name for element [field id] is being defaulted to: ID.
[EL Config]: The column name for element [field country] is being defaulted to: COUNTRY.
[EL Config]: The alias name for the entity class [class model.Publisher] is being defaulted to: Publisher.
[EL Config]: The table name for entity [class model.Publisher] is being defaulted to: PUBLISHER.
[EL Config]: The column name for element [field id] is being defaulted to: ID.
[EL Config]: The column name for element [field name] is being defaulted to: NAME.
[EL Config]: The primary key column name for the mapping element [field address] is being defaulted to: ID.
[EL Config]: The foreign key column name for the mapping element [field address] is being defaulted to: ADDRESS_ID.
[EL Info]: property eclipselink.jdbc.user is deprecated, property javax.persistence.jdbc.user should be used instead.
[EL Info]: property eclipselink.jdbc.driver is deprecated, property javax.persistence.jdbc.driver should be used instead.
[EL Info]: property eclipselink.jdbc.url is deprecated, property javax.persistence.jdbc.url should be used instead.
[EL Info]: property eclipselink.jdbc.password is deprecated, property javax.persistence.jdbc.password should be used instead.
[EL Info]: EclipseLink, version: Eclipse Persistence Services - 2.0.1.v20100213-r6600
[EL Fine]: Detected Vendor platform: org.eclipse.persistence.platform.database.JavaDBPlatform
[EL Config]: Connection(23447542)--connecting(DatabaseLogin(
	platform=>JavaDBPlatform
	user name=> "app"
	datasource URL=> "jdbc:derby://localhost:1527/example;create=true"
))
[EL Config]: Connection(19589694)--Connected: jdbc:derby://localhost:1527/example;create=true
	User: app
	Database: Apache Derby  Version: 10.3.2.1 - (599110)
	Driver: Apache Derby Network Client JDBC Driver  Version: 10.3.2.1 - (599110)
[EL Config]: Connection(7912507)--connecting(DatabaseLogin(
	platform=>JavaDBPlatform
	user name=> "app"
	datasource URL=> "jdbc:derby://localhost:1527/example;create=true"
))
[EL Config]: Connection(9296972)--Connected: jdbc:derby://localhost:1527/example;create=true
	User: app
	Database: Apache Derby  Version: 10.3.2.1 - (599110)
	Driver: Apache Derby Network Client JDBC Driver  Version: 10.3.2.1 - (599110)
[EL Severe]: Local Exception Stack: 
Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Publisher must not reference the isolated class model.Address.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Runtime Exceptions: 
---------------------------------------------------------

	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:478)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)

Descriptor Exceptions: 
---------------------------------------------------------


Local Exception Stack: 
Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Publisher must not reference the isolated class model.Address.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])
	at org.eclipse.persistence.exceptions.DescriptorException.isolateDescriptorReferencedBySharedDescriptor(DescriptorException.java:886)
	at org.eclipse.persistence.mappings.ForeignReferenceMapping.initializeReferenceDescriptor(ForeignReferenceMapping.java:866)
	at org.eclipse.persistence.mappings.ForeignReferenceMapping.initialize(ForeignReferenceMapping.java:840)
	at org.eclipse.persistence.mappings.OneToOneMapping.initialize(OneToOneMapping.java:964)
	at org.eclipse.persistence.descriptors.ClassDescriptor.initialize(ClassDescriptor.java:2634)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:449)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)


Local Exception Stack: 
Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])
	at org.eclipse.persistence.exceptions.DescriptorException.mappingForSequenceNumberField(DescriptorException.java:910)
	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.validate(ObjectBuilder.java:2833)
	at org.eclipse.persistence.descriptors.ClassDescriptor.selfValidationAfterInitialization(ClassDescriptor.java:3528)
	at org.eclipse.persistence.descriptors.ClassDescriptor.validateAfterInitialization(ClassDescriptor.java:5250)
	at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3244)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:463)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)

Runtime Exceptions: 
---------------------------------------------------------

[EL Severe]: Local Exception Stack: 
Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Publisher must not reference the isolated class model.Address.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Runtime Exceptions: 
---------------------------------------------------------

	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:478)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)

Descriptor Exceptions: 
---------------------------------------------------------


Local Exception Stack: 
Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Publisher must not reference the isolated class model.Address.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])
	at org.eclipse.persistence.exceptions.DescriptorException.isolateDescriptorReferencedBySharedDescriptor(DescriptorException.java:886)
	at org.eclipse.persistence.mappings.ForeignReferenceMapping.initializeReferenceDescriptor(ForeignReferenceMapping.java:866)
	at org.eclipse.persistence.mappings.ForeignReferenceMapping.initialize(ForeignReferenceMapping.java:840)
	at org.eclipse.persistence.mappings.OneToOneMapping.initialize(OneToOneMapping.java:964)
	at org.eclipse.persistence.descriptors.ClassDescriptor.initialize(ClassDescriptor.java:2634)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:449)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)


Local Exception Stack: 
Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])
	at org.eclipse.persistence.exceptions.DescriptorException.mappingForSequenceNumberField(DescriptorException.java:910)
	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.validate(ObjectBuilder.java:2833)
	at org.eclipse.persistence.descriptors.ClassDescriptor.selfValidationAfterInitialization(ClassDescriptor.java:3528)
	at org.eclipse.persistence.descriptors.ClassDescriptor.validateAfterInitialization(ClassDescriptor.java:5250)
	at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3244)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:463)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)

Runtime Exceptions: 
---------------------------------------------------------

Exception in thread "main" javax.persistence.PersistenceException: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Publisher must not reference the isolated class model.Address.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Runtime Exceptions: 
---------------------------------------------------------

	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:397)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195)
	at example.Reproduction.main(Reproduction.java:12)
Caused by: Exception [EclipseLink-0] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions: 
---------------------------------------------------------

Exception [EclipseLink-195] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The shared class model.Publisher must not reference the isolated class model.Address.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Exception [EclipseLink-41] (Eclipse Persistence Services - 2.0.1.v20100213-r6600): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: A non-read-only mapping must be defined for the sequence number field.
Descriptor: RelationalDescriptor(model.Publisher --> [DatabaseTable(PUBLISHER)])

Runtime Exceptions: 
---------------------------------------------------------

	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:478)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:406)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:671)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:620)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:228)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:369)
	... 4 more
Comment 5 Gordon Yorke CLA 2010-03-05 15:04:57 EST
*** Bug 205502 has been marked as a duplicate of this bug. ***
Comment 6 Peter Krogh CLA 2010-06-02 13:51:03 EDT
Targetting and assigning for 2.1.1.  One of the first items to be addressed in 2.1.1
Comment 7 Peter Krogh CLA 2010-08-17 09:42:06 EDT
This issue was a bigger item than origionally thought.  Being fixed in 2.2.
Comment 8 Gordon Yorke CLA 2010-11-24 12:11:04 EST
Created attachment 183782 [details]
Intial Pre-Review patch
Comment 9 Karen Butzke CLA 2010-12-06 16:02:01 EST
Hi Gordon,
I have a couple of schema suggestions for you:

1. In bug 328937, Guy mentioned that the partitioning policies should not have been added to the deprecated mapping basic-map and basic-collection. The same should apply for non-cacheable.

2.The annotation is named NonCacheable so I think in the schema it should be 'non-cacheable' instead of 'noncacheable'. Either that or the annotation should be renamed to Noncacheable.
Comment 10 Gordon Yorke CLA 2011-01-18 09:48:36 EST
The annotation has been renamed to Noncacheable
Comment 11 Gordon Yorke CLA 2011-01-18 09:50:22 EST
This bug has been resolved through multiple commits.  This bug was resolved through the new Cache Isolation feature.
Comment 13 TIAGO C CLA 2014-02-24 12:14:58 EST
I found a work around of this bug. I couldn't migrate to JPA 2 so i had to find an other solution.

In my case, i only needed to put the Many size on cache, because this collection is not updated frequently. I couldn't use L2 cache in this collecion because of this bug (since the Many size had a reference to the One side (@ManyToOne).

What i did was to remove the @ManyToOne annotation and i used a normal @Column. And i used the @JoinColumn in the @OneToMany size. I know JPA 1 is not obligated to implement Unidirectional One-to-Many association using a foreign key mapping, but seems that eclipselink 1 supports it.

Hope it helps.
Comment 14 Eclipse Webmaster CLA 2022-06-09 10:20:09 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink