What are the implications of passing no radius to a query based on within

5 views
Skip to first unread message

Rajesh Koilpillai

unread,
Jan 21, 2011, 2:05:19 AM1/21/11
to Morphia
I am using the following call in the 0.99-SNAPSHOT release to fetch objects in a certain radius.

    T within(double x, double y, double radius);

If you pass a valid radius it seems to fetch values, but it throws the following exception if you pass a radius of "0".

com.mongodb.MongoInternalException: couldn't get next element
    at com.mongodb.DBCursor.hasNext(DBCursor.java:459)
    at com.google.code.morphia.query.MorphiaIterator.hasNext(MorphiaIterator.java:40)
    at com.google.code.morphia.query.QueryImpl.asList(QueryImpl.java:234)

Is this a bug on my part or should the code treat this as a near call with no radius parameter. e.g. using T near(double x, double y);

--
Thanks,
- Rajesh Koilpillai

Scott Hernandez

unread,
Jan 21, 2011, 3:46:02 AM1/21/11
to mor...@googlegroups.com
That is server response..

You should specify a value.

Go ahead ahead and try it in the shell.

Reply all
Reply to author
Forward
0 new messages