Hey Google, If that really is a mistake in the documentation that Ftaylor pointed out, can you take the 5 minutes and update it? That 5 minutes sure would pay lots of dividends on the other side in terms of saved minutes trying to figure out why things aren't working.
The documentation is posted here: http://code.google.com/appengine/docs/java/datastore/jdo/queries.html#Introducing_Queries In the Query Filters section, the example shown contradicts the JDO spec according to Andy's response. Now, if the documentation is correct, then I'm just confused, and I'll just crawl back into my computer screen and continue beating my head against this stuff until it makes sense. However, if it's not correct, can we get someone to update that please? It's been 3 years now. :) Thanks, James On Thursday, January 28, 2010 4:45:26 AM UTC-8, Ftaylor wrote: > > Code: > > Class Page { > > List<String> aliases; > > ... > > query = pm.newQuery(Page.class); > query.setFilter(":aliases.contains(alias)"); > query.declareVariables("String alias"); > List<Page> results = (List<Page>)query.execute(alias); > > ... > > } > > I want to select Page objects where the aliases property contains a > given alias String value. Is there any way to do this? I tried as > above and got an exception: > > Problem with query <SELECT FROM getimgs.Page WHERE :aliases.contains > (alias) VARIABLES String alias>: Unsupported method <contains> while > parsing expression: InvokeExpression{[ParameterExpression > {aliases}].contains(VariableExpression{alias})} > > If this cannot be done with JDOQL, the only solution I can think of is > selecting every Page object, then looping through them and using > Java's contains method, but this sucks somewhat. > > Anyone? > > Cheers, > > Finbarr > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/XQkJadTLIg4J. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.