In my code, table A has a foreign key fk which is not null, but JBoss told me that cmr field should be setted at ejbPostCreate method.Then how can i set a not-null cmr field?