Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EclipseLink-48 (Multiple writable mappings exist for the field)
EclipseLink-48 [message #911685] Wed, 12 September 2012 01:59 Go to previous message
Igor B is currently offline Igor B
Messages: 9
Registered: July 2012
Junior Member
Hi,
I have the following:

@Embeddable
public final class Oid {
private byte[] oid;
}

public abstract class Base {

@EmbeddedId
private Oid oid;

}


@Entity
public class A extends Base {

private String txt1;
private String txt2;

@OneToOne(cascade = CascadeType.ALL)
@PrimaryKeyJoinColumn
private B aB;

}

@Entity
public class B extends Base {

private String msg1;
private String msg2;

}

What do I need to fix for not getting the following error:

Exception [EclipseLink-48] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Multiple writable mappings exist for the field [TSI01_A.OID]. Only one may be defined as writable, all others must be specified read-only.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[aB]
Descriptor: RelationalDescriptor(A --> [DatabaseTable(TSI01_A)])
Runtime Exceptions:

I use the OID as primary key for the Entity Class A as well as for B.

Any help is welcome.

best regards,

Igor



 
Read Message
Read Message
Read Message
Read Message
Previous Topic:"updatable = false" column getting updated
Next Topic:Problem filtering with NOT IN clause
Goto Forum:
  


Current Time: Fri May 24 15:11:34 EDT 2013

Powered by FUDForum. Page generated in 0.01908 seconds