Ok, let me be clear with my exact problem. I have a mapping like
While I am trying to update this it says "descrID cannot be null" (it is a not-null field in the database).So I guess the pk is generated by the custom-generator class but is not getting assigned to the foreign key (descrID).Is there any other attribute to be used or any mistake in the mapping ? Please help.
Note :
Although it looks redundant but I have to keep a 'descrID' field in the Java class as well. That is a requirement.