Mondego/spacetime

Deleting all objects of a parent class does not delete its children

Closed this issue · 3 comments

On nodesim, I tried to delete all nodes by doing:

for obj in self.frame.get(Node):
  self.frame.delete(obj)

This should, intuitively, get and delete objects derived from Node as well. But it only manages to delete the Node objects. In a case, for instance, where one simulation wishes to delete all Vehicles, it would have to know all children of Vehicle to achieve that goal, which is not always possible.

There's some controversy here regarding permissions that will have to be thought out. Should someone with deleter permission of nodes be allowed to delete someone else's Node children object?

Obviously, no. We need a permissions system here.

Indeed, one that takes into account Parent-Children relationship as well. I will create an issue to start gathering requirements for the permission system.