i have a table gradeid with primary key is gradeid
i have another table Leave_grade_mapping which has a composite primary key.(id1,id2,gradeif(FK of grade table))
when i run the code i get the following exception
[EL Info]: 2009-11-06 16:46:00.983--ServerSession(5195164)--EclipseLink, version: Eclipse Persistence Services - 1.1.2.v20090612-r4475
[EL Severe]: 2009-11-06 16:46:01.764--ServerSession(5195164)--Local Exception Stack:
Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------
Exception [EclipseLink-48] (Eclipse Persistence Services - 1.1.2.v20090612-r4475): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: Multiple writable mappings exist for the field [leave_grade_mapping.GRADE]. Only one may be defined as writable, all others must be specified read-only.
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[gradeBean]
Descriptor: RelationalDescriptor(com.myoffice.hr.dao.entities.Leave_grade_mapping --> [DatabaseTable(leave_grade_mapping)])
thank you