Skip to main content


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 11:11 Go to next message
Jan Vermeulen is currently offline Jan VermeulenFriend
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

Re: Embeddables don't inherit their 'isolation' status [message #559169 is a reply to message #559026] Wed, 15 September 2010 20:00 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Hello,

Bug 304868 exists for this problem, and includes a workaround of using a customizer to correct the setting in the embeddable's descriptor. The embeddable's descriptor should be a special case as embeddable objects are not cached anyway.

Best Regards,
Chris
Re: Embeddables don't inherit their 'isolation' status [message #559277 is a reply to message #559169] Thu, 16 September 2010 09:02 Go to previous message
Jan Vermeulen is currently offline Jan VermeulenFriend
Messages: 11
Registered: September 2010
Junior Member
Thanks for your reply. I'll check the bug and use the workaround meanwhile.

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


Current Time: Fri Apr 19 20:35:58 GMT 2024

Powered by FUDForum. Page generated in 0.03063 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top