[google-appengine] Deleting entities

2010-08-31 Thread Simon
Hi! I'm trying to delete an object by using the key id. I'm using an automatically generated key; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; What is the best way to delete an object with a specific id? I'm using Java, and had it working

[google-appengine] Deleting entities in bulk.

2010-05-03 Thread Patrick Twohig
Recently, I have refactored my code such that I no longer need entities of a particular kind. I was curious how I would go about writing a task to delete these entities in bulk. I have set up a task that performs a query specifying only the kind, and then using a cursor to delete the entities on

Re: [google-appengine] Deleting entities in bulk.

2010-05-03 Thread Jawaad Mahmood
I had to deal with the same issue myself. I did this: class DeleteFull(): def execute(self): deleting = model_class_name.all().order('__key__').fetch(100) while deleting: a = [] key = deleting[-1].key() for item in deleting:

Re: [google-appengine] Deleting entities in bulk.

2010-05-03 Thread Patrick Twohig
Thanks Jawaad! On Mon, May 3, 2010 at 8:26 PM, Jawaad Mahmood wrote: > I had to deal with the same issue myself. > > I did this: > > class DeleteFull(): >def execute(self): >deleting = model_class_name.all().order('__key__').fetch(100) >while deleting: >a = [] >