EclipseLink-48 [message #911685] |
Wed, 12 September 2012 01:59  |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04111 seconds