It's a limit of the datastore that you cannot have multiple inequality
filters spanning multiple properties. You'll simply need to structure your
data so that it is easier to retrieve.

On Fri, Jun 19, 2009 at 2:58 AM, mclovin <[email protected]> wrote:

>
> Hey,
>
> I have entities stored with x and y values. What I want to do in one
> of my views is to filter them out by their x and y values.
>
> so I have
>
> agents = Agent.all()
>
> neighbors = agents.filter("x >",  user.agent.x-10).filter("x <",
> user.agent.x+10).filter("y >",  user.agent.y-10).filter("y <",
> user.agent.y+10)
>
> which would give me all the other agents within 10 spaces of the
> user's agent making the request.
>
> However When I run it I get a "relational operator" error so I have to
> do this:
> agents.filter("x >",  user.agent.x-10).filter("x <", user.agent.x+10)
> and then iterate through them to filter out the y values manually.
> or this:
> agents.filter("y >",  user.agent.y-10).filter("y <", user.agent.y+10)
> and then iterate through them to filter out the x values manually.
>
>
> So my question is, why cant i filter out both x and y values at the
> same time on a single query?
> >
>


-- 
=======================================
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: [email protected]
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
=======================================

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to