2
Google App Engine ndb 도메인 엔터티에 Webapp2 인증 사용자 개체를 참조로 저장하는 것이 가장 좋습니다. 내가 생각할 수있는Google App Engine에 사용자 개체 저장
3 가지 방법이해야 할 일이
class MyEntity(ndb.Model):
users = ndb.UserProperty(repeated=True)
또는
class MyEntity(ndb.Model):
users = ndb.StringProperty(repeated=True)
내가
user.get_id()
또는
같은 사용자 ID에게 webapp2 사용자 개체에서의 저장 것class MyEntity(ndb.Model):
users = ndb.KeyProperty(repeated=True)
내가 가장 좋은 방법은 여기에 무엇을 나는 확실하지 않다
user.key
같은 webapp2 사용자 개체에서 사용자 키를 저장하는 것
? 특히 user_id와 key를 저장하면 어떤 이점이 있습니까? UserProperty가 일을하는 오래된 방법이라고 가정합니다.
는 ID를 더 키가 아닌가요? – dboyd68
ID는 사용자를 고유하게 식별하는 것으로 Key는 구현에 따라 다를 수 있습니다. – jdiaz5513