workstep has a many to one relationship with workcentertype, which is not nullable
workstep has a many to one relationship with workcenter, which is nullable
workstep maps woce_client and wcty_client to only one column wstp_wcty_client in the workstep table.
If I load an entity bean, where the workcenter is null, JBoss tries to set also also the other part of the foreign key wstp_wcty_client to null. But this field must not be null because it is also part of the foreign key to workcentertype.
Any hints how to handle this situation are appreciated.