Social Reiot

Social Game Developer wandering in strange dungeon.

Class A(db.Model): B = db.ReferencePrope...

class A(db.Model): b = db.ReferenceProperty() b = load_B() for a in A.all().fetch(1000): if a.b == b.key(): print we found break 위와 같은 예제에서 단지 특정 모델의 ReferenceProperty 키값만을 비교하려고 할 때에도 datastore_v3.Get 이 일어나서, 참조하는 모델의 전체 값을 읽어오게 된다. 이때 get_value_for_datastore() 를 사용하면 불필요한 로딩을 막아준다. for a in A.all().fetch(1000): if A.b.get_value_for_datastore(a)!= _b.key():

Comments