Sorry, it was 2 years ago. I added wrong :) James
On Wednesday, February 3, 2010 9:40:27 AM UTC-8, Ftaylor wrote: > > There actually seems to be a mistake in the documentation: > > > // Give me all Employees with lastName equal to Smith or Jones > Query query = pm.newQuery(Employee.class, > ":p.contains(lastName)"); > query.execute(Arrays.asList("Smith", "Jones")); > > Surely it should be: > > > // Give me all Employees with lastName equal to Smith or Jones > Query query = pm.newQuery(Employee.class, > "p.contains(:lastName)"); > query.execute(Arrays.asList("Smith", "Jones")); > > > On Feb 2, 10:29 pm, "Ikai L (Google)" <ika...@google.com> wrote: > > Oy, this is what I get for not running code before posting it. Good > looking > > out. > > > > On Tue, Feb 2, 2010 at 1:06 AM, datanucleus <andy_jeffer...@yahoo.com > >wrote: > > > > > > > > > > > > > > query.setFilter("aliases == alias"); > > > > > That is invalid JDOQL syntax; the spec is the spec and JDOQL uses Java > > > syntax. > > > If you have a collection field then the filter should be > > > > > aliases.contains(:alias) > > > > > The poster put the colon in front of a field name (wrong), and > > > declared a parameter as a variable (wrong). > > > > > -- > > > 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-java@googlegroups.com. > > > To unsubscribe from this group, send email to > > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2B > > > > unsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine-java?hl=en. > > > > -- > > Ikai Lan > > Developer Programs Engineer, Google App Enginehttp:// > googleappengine.blogspot.com|http://twitter.com/app_engine > > -- 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/-/k-5OJNQMQmUJ. 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.