views:

51

answers:

2

Is there a way to move an entity to another kind in appengine.

Say you have a kind defines, and you want to keep a record of deleted entities of that kind. But you want to separate the storage of live object and archived objects. Kinds are basically just serialized dicts in the bigtable anyway. And maybe you don't need to index the archive in the same way as the live data. So how would you make a move or copy of a entity of one kind to another kind.

+1  A: 

Unless someone's written utilities for this kind of thing, the way to go is to read from one and write to the other kind!

Carl Smotricz
+1  A: 

No - once created, the kind is a part of the entity's immutable key. You need to create a new entity and copy everything across. One way to do this would be to use the low-level google.appengine.api.datastore interface, which treats entities as dicts.

Nick Johnson