python - Recursive delete in google app engine -


I am using Google App Engine with django 1.0.2 (and django-helper) and am surprised that people How to remove recursive Assuming you have such a model, which is something like this:

class top (besomodel): pass class below (besomodel): dad = db. References (top)

Now, when I delete a type of 'top' object, I want to remove all related 'bottom' objects too.

As things are now, when I remove a 'top' object, I have 'left' objects and then I get the data that is not anywhere while reaching the datastore in a scene, I Ends with:

 An exception was caught while rendering: Failed to resolve reference property. 

I can certainly find all the items and remove them, but since my real model is at least 5 levels deep, I hope that there is a way to ensure that It can be done automatically.

I have found out how it works with Java and it looks as beautiful that I also want

Nobody knows how I would like that behavior to be deeggo Can i get in

You need to apply it manually, seeing affected records and removing them at the same time Also, when you delete the original record

For the reasons of performance, you almost certainly want to use the key-only questions (if you want, then you will be in your original class The delete () method can make it easier by overriding. That allows organizations to be erased without deleting and defining), and removes batch, for example:

  db.delete (all below (keys_only = True) .Filter (" Father = ", top) .at (1000))  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -