Guys,
Just to add some information for who ever's fixing the nullable foreign key field problem.
In JBoss 3.0.0 alpha, we had a work around. We declared both a CMP and CMR field for the same DB column (the FK field).
Then in ejbCreate() we called setCmpFKField( obj.getId() ), and in ejbPostCreate() we called setCmrFKObj( obj )

This worked fine, although we did an INSERT and then an unnecessary UPDATE.

When we try this solution in JBoss 3.0.0 Final, the system generates an INSERT statement with two references to the FK Column. Oracle (in our case) rejects this as bad SQL.

Question 1: Is it according to the EJB 2 spec to have a CMR and CMP field for the same DB column?
Question 2: Will the fix for non-null foreign key fields be made available as a patch?

Ciao,
Jonathan O'Connor
Ph: +353 1 872 3305
Mob: +353 86 824 9736
Fax: +353 1 873 3612

Reply via email to