ObjectDB ObjectDB

Cascade delete with unidirectional mapping


    Suppose entity A is referenced from entity B, like (A -> * B) but not actually having that reference, instead only B has @ManyToOne relationship to A and A has none.

Is there a way to cascade delete of B's when deleting A? Or this should be done programatically with separate call to database?


Operations are cascaded using relationships, so if you have no relationship in that direction you have to perform the operation explicitly in your code (maybe in a lifecycle event).

ObjectDB Support


To post on this website please sign in.