Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Check-in : Bug 232063 - Relationships between JPA 2.0 Cachable(false) and Cachable(true) Entities should be supported

Hi Gordon,

great that you are working on this issue! I am looking forward to try this it out. 

Just, I am wondering how you are tackling relationships between cached and non-cached entities and what the intended semantics are. For single-valued relationships, I see different options:

1) Cache the id of the related entities but not the related entities themselves.
2) Establish all relationship once the entities are read from the cache. 

I think 1) would be preferable if the cached entity is the owning side of the relationship. I am unsure about the case when the cached entity is the non-owning side.

What about collection-valued relationships? Will the ids of the related entities be cached?

What about relationships between read-only and mutable entities. (I think no read-only entity should be allowed to have a relationship to a mutable one).

The design doc http://wiki.eclipse.org/EclipseLink/DesignDocs/232063 doesn't answer this for me. 

Or are you just switching of the cache for an entity if it has a reference to a non-cacheable entity:

"When an entity with @Cacheable(true) has a relationship to an entity with @Cacheable(false) or an @Cacheable(true) entity has a @NonCacheable relationship we will default to and only allow the Entity to be @Cacheable(false)"


-Adrian










Adrian Görler
SAP AG

Pflichtangaben/Mandatory Disclosure Statements:
http://www.sap.com/company/legal/impressum.epx 

-----Original Message-----
From: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] On Behalf Of Gordon Yorke
Sent: Dienstag, 30. November 2010 03:52
To: Dev mailing list for Eclipse Persistence Services
Subject: [eclipselink-dev] Check-in : Bug 232063 - Relationships between JPA 2.0 Cachable(false) and Cachable(true) Entities should be supported

https://bugs.eclipse.org/bugs/show_bug.cgi?id=232063

Allows for referencing isolated data from shared data.
Allows Entity class to be marked as protected isolation so that queries 
returning shared data results that are not returning shared cache instances

More check-ins to come to cover off on JavaDoc updates and extensive 
testing.
--Gordon
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev


Back to the top