Just and a FilterPredicate that EQUAL "hamburger" to your Query:
Quenry query = new Query("recipe");
query.addFilter("ingredients", Query.FilterOperator.EQUAL,
"hamburger");
for (Entity receipt : service.prepare(query).asIterable()) {
// do stuff
}
On Aug 25, 2:53 pm, ted stockwell <[email protected]> wrote:
> Hi All,
>
> I am using the low-level Datastore API in my application.
> Suppose I store a bunch of 'Recipe' entities, where each entity has a
> multivalued property named 'ingredients", and the ingredients property
> is a set of Strings.
> For instance:
> Entity recipe= new Entity("recipe", "tater tot casserole");
> recipe.setProperty("ingredients", new HashSet() {{
> add("Tater Tots");
> add("peas");
> add("Cream of Celery Soup");
> add("hamburger");
> }});
>
> Can I create a Query in the low-level API that will select all recipes
> that include 'hamburger" in the ingredients???
>
> I'm thinking that it's possible since it's supported in the JDO API,
> but I cannot see how it should be done.
>
> Thanks in advance,
> -ted stockwell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---