Question

Must be missing something really dumb here. This GQL query:

q_count = Questions.gql('WHERE questionnaire = :1 AND deleted = False AND required = True', q).count(1000)

generated following error: ERROR 2012-12-21 11:19:51,760 _webapp25.py:468] Property 'required' is not indexed

Even though my index.yaml contains the following entry:

- kind: Questions properties: - name: questionnaire - name: deleted - name: required

What am I missing!

Was it helpful?

Solution

Now I feel stupid. Here is the line for 'required' in my Questions model:

required = db.BooleanProperty(default=False, indexed=False)

doh. The PropertyError which was raised in the log is defined as follows in GAE docs:

exception PropertyError() The referenced model property does not exist on the data object.

OTHER TIPS

For equality-only queries you do not need to define compound indexes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top