Here's a method I've discovered for changing the class on PolyModel, which I 
think is relatively clean:

ent1 = Model1.get(…)  # Or get_by_id, etc
dict = db.to_dict(ent1)
del dict['class']
# Other changes to dict, as required, adding/removing properties
ent2 = Model2(key=ent1.key(), **dict)
ent2.put()

I think that's fairly clean, although I've not used it heavily.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/-CAdxp8LpocJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to