Hi Saravanan, The code snippet below doesn't look like the source of the problem.
Perhaps you could post all of the annotations for the fields in question? And try using OpenJPA...
Regards, Craig On Jul 26, 2007, at 9:28 PM, saravanan_tvm wrote:
Hi, 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 @joincolumn(name="PARENT_RECORD_ID") private Drug drug @joincolumn(name="PARENT_RECORD_ID") 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....MULTIPLE_WRITE_MAPPINGS_FOR_FIELDCause: 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 raisedduring the validation process of descriptors. Action: Make one of those mappings read-onlyBut i cannot make read only, if i make read only then while inserting newrecords it will be problem please can anyone provide the solution for this... Regards, Saravanan. --View this message in context: http://www.nabble.com/How-to-map- multiple-properties-to-same-column-as-writable-in-jpa- tf4155235.html#a11822480Sent from the OpenJPA Developers mailing list archive at Nabble.com.
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
