views:

75

answers:

1

I want to do an OR filter within google app engine.

For example:

class MyModel(db.Model):
    name = db.StringPropery()
    description = db. StringPropery()

The following will return all "MyModel" instances with name = steve AND description = "some text"

results = MyModel.all().filter("name =", "steve").filter("description =","some text").fetch(10)

What syntax do I use to change this to an OR statement? Or do I need to do two queries and then merge them somehow?

+1  A: 

I found another thread with some answers here: app-engine-datastore-does-not-support-operator-or

Not sure how to mark this as a duplicate. Sorry.

jonmiddleton