# HG changeset patch # User gernotbelger # Date 1527238182 -7200 # Node ID 02e4a0d983c00d61d35cf44347ba373ecddb837b # Parent 7e60457f9d2693d7e99fb97a969ee0e48b8d77f3 Fixed :bed heights finder did not consider the river correctly diff -r 7e60457f9d26 -r 02e4a0d983c0 backend/src/main/java/org/dive4elements/river/model/BedHeight.java --- a/backend/src/main/java/org/dive4elements/river/model/BedHeight.java Fri May 25 10:49:23 2018 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/BedHeight.java Fri May 25 10:49:42 2018 +0200 @@ -243,11 +243,12 @@ return singles != null ? singles.get(0) : null; } - public static BedHeight getBedHeightByDescription(final String description) { + public static BedHeight getBedHeightByDescription(final River river, final String description) { final Session session = SessionHolder.HOLDER.get(); - final Query query = session.createQuery("FROM BedHeight WHERE (trim(description)=:description)"); + final Query query = session.createQuery("FROM BedHeight WHERE (trim(description)=:description) AND river=:river"); + query.setParameter("river", river); query.setParameter("description", description); final List singles = query.list();