How do you query for a list of objects stored using GAE, where a Set
field contains a specified string? ie Imagine this imaginary example:
@PersistenceCapable
class Photos {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
String name = "";
Set<String> tag = new Hashset<String>();
}
Assuming there are 40,000 photos in the "database", How do I Query
all photos where tag='2009'
Or another example from google's documentation, if you have the following class:
@PersistenceCapable
public class Person {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;
@Persistent
private Set<Key> favoriteFoods;
// ...
}
How do you fetch a list of all Person objects where they have a specific favourite food Key?