[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] nearestNeighbor returns only 1 result
|
Hi Mark,
Try turning our logging to the FINEST level and take a look at the generated
SQL. Does it look correct? When you run it in an SQL console, does it return
more than one result?
Use the persistence unit property eclipselink.logging.level=FINEST to set the
logging level.
-Tom
Mark Robinson wrote:
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