Quote:
it should be @JoinColumn(name="CUST_ID" , nullable = false)
Not really. nullable=false is required only for non-null foreign key column.
Usually if you specify cascade for a one-to-many relation then hibernate first creates the child objects (with null value in foreign key column), then the parent and then updates the child row's foreign key column with parent's id. (This will cause a constraint violation if the foreign key column is non-null)
But if the nullable=false is specified, then first the parent row is created and then child row is created withe the foreign key of the parent and this will solve the constraint violation error. (I dont know why hibernate doesn't do like this in the nullable=true case also so that this special case can be avoided.)