Fix query to fetch report not fetching reports with no handler

This commit is contained in:
Keir Nellyer 2016-08-19 14:19:52 +01:00
parent e6609d59c9
commit 24d4da6aa2

View File

@ -63,10 +63,9 @@ public class ReportRepository
" AND handlerId = ?;";
private static final String GET_REPORT = "SELECT * FROM reports" +
" LEFT JOIN reportHandlers ON reports.id = reportHandlers.reportId" +
" LEFT JOIN reportHandlers ON reports.id = reportHandlers.reportId AND reportHandlers.aborted IS FALSE" +
" LEFT JOIN reportResults ON reports.id = reportResults.reportId" +
" WHERE reports.id = ?" +
" AND reportHandlers.aborted = FALSE;";
" WHERE reports.id = ?;";
private static final String GET_REPORT_REASONS = "SELECT * FROM reportReasons" +
" WHERE reportId = ?" +