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 post to this group, send email to google-appengine-j...@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.

Reply via email to