Hi guys,
I am facing problem when creating entity bean. I am using oracle and weblogic server.
I have many to one unidirectional relationship. I hv two tables that i am interested with :
1. Table A
2. Table B.
In Table A, there is a FK refernece to Table B. e.g. CMP field a2 is mapped with b1 field in Table B. Here a2 is not primary key it is just foreing key. From Table A, it is Many to one unidirectional relation ship. In table B, b1 is primary key.
Here i hv CMR Accessor method in Table A and it is unidirectional. As it is many to one relationship exists Accessor methods in A
EJB returning me (public B getB()).
When i am trying to call create method on home, it will give me the following errors. Peristance type of entity bean is CMP :
javax.ejb.EJBException: When a cmp-field and a cmr-field (relationship) are mapped to the same column, the setXXX method for the cmp-field may not be called. The cmp-field is read-only.
I have also tried to set that cmr filed in ejbPostCreate, though it' giving me error.
Can anybody hv faced this problem and knowing the solution ?
Thanks in advance,
Dimple sharma