# HG changeset patch # User Sascha L. Teichmann # Date 1405587398 -7200 # Node ID 8c14588d1f78afdf252d289c9a2cf7e9c327794f # Parent 549f18bf0008202f0a199e4f439b7441551211a2 ImporterSession: Load measurement stations via ranges which hold a reference to the river. diff -r 549f18bf0008 -r 8c14588d1f78 backend/src/main/java/org/dive4elements/river/importer/ImporterSession.java --- 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>(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();