Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using field() and near() in conjunction with filter() and asList() yields List<Model> #116

Open
blinder opened this issue Oct 29, 2013 · 0 comments

Comments

@blinder
Copy link

blinder commented Oct 29, 2013

When using a query such as:

List<Thing> things = Thing.q() .filter("attributeA =",attributeA) .field("geo") .near(lat,lon) .asList();

throws a compilation error demanding that List<Thing> (which extends Model) be: List<Model>

However if you just have:

List<Thing> things = Thing.q().filter("attributeA =",attributeA).asList();

is fine (as i have all over my code)

I've made sure that the field 'geo' in my Model has the proper index: @Indexed(IndexDirection.GEO2D)

I'm not sure if i'm just doing something wrong or if using field()/near() returns a non bounded wildcard generic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant