I believe the bug is that the operation is cascaded to the association (Post#details), before saving the parent (Post). Hibernate should cascade the association after the save instead.