Delete childs of a One-to-Many relation when the parent gets deleted

Hi!
I have a One-to-Many relation and I handled it like described in the docs. So I have the classes A and B. A has many of B. So every object of class B has a pointer to an object of class A.

Now if I delete an object of class A, any object of class B that pointed to the deleted object remains in the database and the pointer still points to the deleted object. In my case it makes no sense for the objects of class B to remain if the object of class A is deleted. Before deleting object A, do I first have to load and delete all objects of class B that have a pointer to the object A? Or is there a better way?

it looks like you’ll have to handle the deletion of those objects