I currently have a model in NDB and I'd like to change the property name without necessarily touching NBD. Let's say I have the following:
from google.appengine.ext import ndb
class User(ndb.Model):
company = ndb.KeyProperty(repeated=True)
What I would like to have is something more like this:
class User(ndb.Model):
company_ = ndb.KeyProperty(repeated=True)
@property
def company(self):
return '42'
@company.setter
def company(self, new_company):
#set company here
Is there a relatively pain-free way to do so? I'd like the convienance of using property getter/setters, but given the current implementation I would like to avoid touching the underlying datastore.