hmarr/mongoengine — pull request #517 by shaunduncan (2012-06-15 19:47:58+00:00)
Title: Self-Referencing Cascade Deletes

I was noticing calls to delete resulting in an infinite loop for self-referencing ReferenceFields. The query was recursively issuing deletes for finding field__in=[]. I've added a check that if the delete rule is self-referential, a cascade delete is only issued if there actually objects to delete.