Trying to figure out the best practice when storing Webapp2 Auth user objects as a reference in a google app engine ndb domain entity.
The 3 ways I can think to do it
class MyEntity(ndb.Model):
users = ndb.UserProperty(repeated=True)
or
class MyEntity(ndb.Model):
users = ndb.StringProperty(repeated=True)
where I would store user id's from the webapp2 User object like
user.get_id()
or
class MyEntity(ndb.Model):
users = ndb.KeyProperty(repeated=True)
where I would store user key from the webapp2 User object like
user.key
I am not sure what is the best practice here? In particular is there any advantage to storing user_id vs key? Assuming UserProperty is the old way of doing things?