Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Exception: non-read-only mapping defined for the primary key field

903474Dec 3 2011 — edited Dec 5 2011
Hello.

I'm new to Oracle and I created Java EE Web Project.

And I created entities from tableA, tableB, tableC from my database.

tableA has foreign key to tableB and has unidirectional Many-to-One relationship. tableC has two primary keys and one of these is foreign key to primary key in tableA. tableC also has unidirection Many-to-One relationship to tableA.

Then I created session bean and data control from it, in design window, created read-only table from tableA.

And I selected columns in tableA and also in tableB.

I ran the application and saw the following exception in log window.

Local Exception Stack:
Exception [EclipseLink-46] (Eclipse Persistence Services - 2.1.3.v20110304-r9073): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: There should be one non-read-only mapping defined for the primary key field [tableC.tableA_ID].
Descriptor: RelationalDescriptor(mypack.tableC --> [DatabaseTable(tableC)])

tableA_ID is a primary key in tableA.

How can I solve this error?

Please help me.

Edited by: 900471 on 2011. 12. 3 오전 5:32

Edited by: 900471 on 2011. 12. 3 오전 5:33

Edited by: 900471 on 2011. 12. 3 오전 5:33

Edited by: 900471 on 2011. 12. 3 오전 5:34
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2012
Added on Dec 3 2011
1 comment
4,414 views