Embeddables don't inherit their 'isolation' status [message #559026] |
Wed, 15 September 2010 11:11 |
Jan Vermeulen Messages: 11 Registered: September 2010 |
Junior Member |
|
|
I am using EclipseLink 2.1.1.
When using the sharedCacheMode ENABLE_SELECTIVE, I have a problem with embeddables: if no @Cacheble(true) annotation has been defined on the entity that contains the embeddable, it seems that the descriptor of the embeddable has the 'isIsolated' property FALSE. If that embeddable contains a ManyToOne reference to another entity that is not cached, a DescriptorExcpetion is thrown, saying that an shared object cannot have a reference to an isolated one. In case of an embeddable, I would expect the embeddable's 'isIsolated' state to be the same as the entity that contains it (in this case TRUE).
A simple example:
@Entity(name="Person")
@Cacheable(false)
public class Person {
@Embedded
private Address address;
}
@Embeddable
public class Address {
@ManyToOne
private City city;
}
@Entity
@Cacheable(false)
public class City {
}
[Updated on: Wed, 15 September 2010 11:12] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03063 seconds