openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saravanan_tvm <>
Subject How to map multiple properties to same column as writable in jpa
Date Fri, 27 Jul 2007 04:28:17 GMT

I am using toplink from oracle to support JPA.
I have the following requirement...
i have to map same column for multiple properties using @joincolumn
annotation.. eg its something like this

private Drug drug

private Reaction reaction

PARENT_RECORD_ID is nothing but primary key of parent table.
but while accessing the application i am getting the following exception....


Cause: Multiple writable mappings for the field fieldName are defined in the
descriptor. Exactly one must be defined as writable; the others must be
specified as read-only. When multiple write mappings are defined for the
field, TopLink is unable to choose the appropriate mapping for writing the
value of the field in the database row. Therefore, the exception is raised
during the validation process of descriptors. 

Action: Make one of those mappings read-only

But i cannot make read only, if i make read only then while inserting new
records it will be problem

please can anyone provide the solution for this...

View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message