I have two classes, Department and Employee. Department has a property declared as
employees = ndb.KeyProperty(kind=ClassB, repeated=True)
The problem is,when i delete the entity whose key is held in the employees list, the entity is deleted in the Employee datastore, but the list in Department datastore remains the same (with the key of the deleted employee still in it).
How do i make sure that when the Employee is deleted, all references to it in the Department datastore is deleted as well?