Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] nearestNeighbor returns only 1 result

So I have this snippet of code

     ReadAllQuery raq = new ReadAllQuery(NavteqPoiBean.class);
     ExpressionBuilder eb = raq.getExpressionBuilder();
     SpatialParameters parameters = new SpatialParameters();


Expression spatialExp = SpatialExpressionFactory.nearestNeighbor(eb.get("geom"), geom, parameters);

     raq.setSelectionCriteria(spatialExp);
     raq.prepareForExecution();
     Session session = ((EntityManagerImpl)getEm()).getSession();
     List<RowInterface> pois = (List)session.executeQuery(raq);

When I run it, I only get one result which I think is wrong, the table has about 7000 rows. Does EclipseLink not support returning more than one result from this query or am I doing this wrong?

Mark

--
Mark Robinson, EIT - Mizar LLC
mark.robinson@xxxxxxxxx
111-1010 McKenzie Ave.
Victoria, BC
V8X 4B2
(360) 296-4125



Back to the top