# HG changeset patch # User Felix Wolfsteller # Date 1374483821 -7200 # Node ID 7e697c6eb3794aaf7c7316829954e8d6129799b9 # Parent 0bc7d3546470d0efb59fea3732541192301d7b56 CrossSection: Improve SQl compat of statement. diff -r 0bc7d3546470 -r 7e697c6eb379 backend/src/main/java/org/dive4elements/river/model/CrossSection.java --- a/backend/src/main/java/org/dive4elements/river/model/CrossSection.java Fri Jul 19 13:52:35 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/CrossSection.java Mon Jul 22 11:03:41 2013 +0200 @@ -65,8 +65,8 @@ "WHERE cross_section_id IN " + " (SELECT id FROM cross_sections WHERE river_id = :river_id) " + " GROUP BY cross_section_id" + - ") AS cs_ranges " + - "JOIN cross_sections as CS on cs_ranges.cross_section_id = cs.id " + + ") cs_ranges " + + "JOIN cross_sections CS on cs_ranges.cross_section_id = cs.id " + "LEFT OUTER JOIN time_intervals on cs.time_interval_id = time_intervals.id " + "WHERE :km BETWEEN minkm AND maxkm " + "ORDER BY stop_time desc, start_time asc, :km - minkm";