이상한 행동을 묻습니다. Google App Engine 데이터 저장소
class Group(db.Model):
name = db.StringProperty()
description = db.TextProperty()
때때로 다음과 같은 쿼리를 실행할 때 :
groups = Group.all().order("name").fetch(20)
또는
groups = Group.all()
다음과 같은 오류가 발생합니다.
Traceback (most recent call last):
File "/opt/google_appengine/google/appengine/ext/webapp/__init__.py", line 501, in __call__
handler.get(*groups)
File "/home/al/Desktop/p/mwr-dev/main.py", line 638, in get
groups = Group.all()
AttributeError: type object 'Group' has no attribute 'all'
하지만 같은 의미의 GQL 쿼리를 사용하면 모든 것이 잘됩니다.
왜 그렇게됩니까? GAE가 왜 '모두'가 중요하다고 생각하는지 모르겠습니까?
업데이트 : 죄송합니다 ... 나는 또한 요청 처리기가 모델과 동일한 이름을 가졌습니다. (