fernandohur
fernandohur

Reputation: 7144

How to do an OR with Objectify

I havent been able to figure out how to do something equivalent to this SQL statement in Objectify

SELECT * FROM myTable WHERE myTable.attribute = 'X' OR myTable.attribute = 'Y'.

Any help would be appreciated.

Upvotes: 1

Views: 291

Answers (1)

Nick Johnson
Nick Johnson

Reputation: 101149

You can't use 'OR' criteria in App Engine. Each query is executed as a single index scan, and that's not possible with disjunctions. Instead, you need to execute each query separately, and intersect the results.

I'm not sure how this relates to text search, however.

Upvotes: 3

Related Questions