I use App Engine datastore with JDO to store data about all users' posts along with the latitude & longitude of the place where they're posted from.
Provided with the co-ordinates of current user, I want to retrieve nearby posts within x kilometres of the current user.
At first I tried querying for a range of latitude & longitude, but it isn't possible as datastore doesn't support inequality filters on multiple properties.
According to this answer in RDBMS it can be achieved by performing calculation within the query itself.
How do I perform this query in JDO? Is there a better way to store the location data where it can be easily retrieved by calculating the distance?