I am using Ebean and I need to end up getting "on delete cascade" as DDL (data definition language) - which annotation does that? I tried
@OneToMany(cascade=CascadeType.REMOVE)
but that gives "on delete restrict" / doesn't change the default "on delete restrict"?
Try this
@OneToMany(mappedBy = "parent", cascade = javax.persistence.CascadeType.REMOVE)
@Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With