Andre Serodio
2005-01-25 14:14:00 UTC
Hi,
I need some help on understanding CMR and FK that do not accept nulls.
I have a composition in my model. It is also implemented in my database (Oracle 9i).
Whenever I try to call the create() method on the child entity I receive a SQL Exception telling that I cannot insert null values in my FK.
If I try to set the value of the FK "by hand" I receive the following..
javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception is: javax.ejb.EJBException: [EJB:010145]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.
What should I do?
Thank you in advance...
André
I need some help on understanding CMR and FK that do not accept nulls.
I have a composition in my model. It is also implemented in my database (Oracle 9i).
Whenever I try to call the create() method on the child entity I receive a SQL Exception telling that I cannot insert null values in my FK.
If I try to set the value of the FK "by hand" I receive the following..
javax.ejb.TransactionRolledbackLocalException: EJB Exception:; nested exception is: javax.ejb.EJBException: [EJB:010145]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.
What should I do?
Thank you in advance...
André