AppEngine filter command – fail

I’ve been using AppEngine, almost entirely using the GQL language to return my objects.  This is a bit of a curse, and now I’m playing with gaegene’s pagination lib, I’m having to look at why I did this.

I did things this way because I couldn’t get filter() to work.  I didn’t want to waste time finding out why, so I simply avoided it.  If you had to do the why on every command in GAE, you’d never complete anything.

Anyway, I’ve now found out why:

“The name and the operator must be separated by a space, as in: age >
GAE Docs

So my filter command:

messages.all.filter(‘board=’, board)

did not work, and I should have done this:

messages.all.filter(‘board =’, board)

Rarg.

This entry was posted in Projects and tagged , . Bookmark the permalink.
  • http://twitter.com/kennethkufluk Kenneth Kufluk

    Nope, you should add brackets after 'all':
    messages.all().filter(’board =’, board)

  • http://twitter.com/kennethkufluk Kenneth Kufluk

    Nope, you should add brackets after 'all':
    messages.all().filter(’board =’, board)