Merge pull request #3900 from APriestman/3934_sqlException

3934 Change query to allow for multiple data sources with the same device ID
This commit is contained in:
Richard Cordovano 2018-06-26 13:46:12 -04:00 committed by GitHub
commit 3bc9e19724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -881,7 +881,7 @@ abstract class AbstractSqlEamDb implements EamDb {
sql
+= "+ (SELECT count(*) FROM "
+ table_name
+ " WHERE case_id=(SELECT id FROM cases WHERE case_uid=?) and data_source_id=(SELECT id FROM data_sources WHERE device_id=?))";
+ " WHERE data_source_id=(SELECT data_sources.id FROM cases INNER JOIN data_sources ON cases.id = data_sources.case_id WHERE case_uid=? and device_id=?))";
}
try {