mejohn5 / javageomodel

Automatically exported from code.google.com/p/javageomodel
0 stars 0 forks source link

Problems with BaseQuery #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to retrieve data from a database using the proximity fetch function.
I'm having problems with the baseQuery parameter.
Actually, I didn't understand how to use it. I attached an image of our 
database, I don't have a special attribute to filter the data, so It's like I 
don't have a base query.

What would be in our case the base query?

On the other side, I'll like to thank you for all the job you've take to do 
this projects. It's been really really useful.

Original issue reported on code.google.com by namare...@codigodelsur.com on 26 Jul 2010 at 9:54

Attachments:

GoogleCodeExporter commented 9 years ago
Hi again, I think I may founded a solution for this. This is what I did:

params.add(KeyFactory.createKey(GeoMessage.class.getSimpleName(), 1));

baseQuery = new GeocellQuery("key >= idParam", 
"com.google.appengine.api.datastore.Key idParam", params);

This way its fetching all rows where ID is greater than 1. I'm sure this is not 
the right way to do this.

Thanks again.

Nicolás.

Original comment by namare...@codigodelsur.com on 26 Jul 2010 at 10:01

GoogleCodeExporter commented 9 years ago
Hi Nicolas,

You're right, it was not easy to call the function when you had no parameters 
for your base query.
So, now there is an empty constructor : GeocellQuery baseQuery = new 
GeocellQuery();
Use this one instead of your solution.

Original comment by alexandr...@gmail.com on 10 Nov 2010 at 7:49