Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Embeddables don't inherit their 'isolation' status (Embeddables don't inherit their 'isolation' status from the entity that contains them, causing a DescriptorException)
Embeddables don't inherit their 'isolation' status [message #559026] Wed, 15 September 2010 07:11 Go to previous message
Jan Vermeulen is currently offline 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 07:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic:Are UnitOfWork#hasChanges side effects a bug?
Next Topic:Eclipselink, JavaSE and multiple JDBC datastores
Goto Forum:
  


Current Time: Wed May 22 23:48:16 EDT 2013

Powered by FUDForum. Page generated in 0.02466 seconds