[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[eclipselink-users] nearestNeighbor returns only 1 result
|
- From: Mark Robinson <mark.robinson@xxxxxxxxx>
- Date: Fri, 25 Sep 2009 15:08:34 -0700
- Delivered-to: eclipselink-users@eclipse.org
- User-agent: Thunderbird 2.0.0.23 (Windows/20090812)
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