Cascade delete with unidirectional mapping

#1

    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?

#2

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

Reply