Hibernate unidirectional OneToMany delete violates constraint ( optional=false at parent side?)
问题 I use Hibernate 3.6 and I have something like this: @Entity public class Parent { @OnyToMany( fetch = FetchType.LAZY, cascade = { ascadeType.ALL } ) @Cascade( { org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.DELETE ) @JoinColumn( name="Parent_ID" ) public List<Child> getChildren() { return children; } public void setChildren( List<Child> children ) { this.children = children; } private transient List<TitleMetadataCategory> children; ... } @Entity