Re: [eclipselink-dev] Check-in : Bug 232063 - Relationships between JPA 2.0 Cachable(false) and Cachable(true) Entities should be supported
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)"
Pflichtangaben/Mandatory Disclosure Statements:
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
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
eclipselink-dev mailing list