I encountered an exception while attempting to remove EntityA, which has a OneToMany relationship with EntityB. The joinColumn is one of the fields within the EmbeddedId in EntityB. I'm aware that Hibernate tries to set the join column as null, provided that it has the same value as EntityA's id, before deleting EntityA and all associated EntityBs. However, it's possible that a not-null constraint exists for the EmbeddedId object, which prevents setting it as null. OR MAYBE i don’t use it correctly?
|