Mercurial > dive4elements > river
changeset 8046:8c14588d1f78
ImporterSession: Load measurement stations via ranges which hold a reference to the river.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 17 Jul 2014 10:56:38 +0200 (2014-07-17) |
parents | 549f18bf0008 |
children | c835f3cf098e |
files | backend/src/main/java/org/dive4elements/river/importer/ImporterSession.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/ImporterSession.java Thu Jul 17 07:46:18 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/ImporterSession.java Thu Jul 17 10:56:38 2014 +0200 @@ -219,7 +219,7 @@ new TreeMap<Double, List<MeasurementStation>>(EpsilonComparator.CMP); riversToMeasurementStations.put(river, km2Stations); Query query = databaseSession.createQuery( - "from MeasurementStation where river.name = :name"); + "from MeasurementStation as ms inner join ms.range as r where r.river.name = :name"); query.setParameter("name", river); for (Iterator iter = query.iterate(); iter.hasNext();) { MeasurementStation st = (MeasurementStation)iter.next();