Skip to content
Snippets Groups Projects
Commit 7314cc64 authored by srosse's avatar srosse
Browse files

OO-1075: force the group by for all databases but MySQL (it's the only DB...

OO-1075: force the group by for all databases but MySQL (it's the only DB where the group by is case insensitive)
parent fc5263a9
No related branches found
No related tags found
No related merge requests found
......@@ -488,6 +488,11 @@ public class QTIStatisticsManagerImpl implements QTIStatisticsManager {
}
private List<StatisticAnswerOption> getStatisticAnswerOptionsOfItem(String itemIdent, QTIStatisticSearchParams searchParams, boolean groupBy) {
//the group by of mysql is case insensitive
if(!groupBy && !dbInstance.getDbVendor().equals("mysql")) {
groupBy = true;
}
StringBuilder sb = new StringBuilder();
sb.append("select res.answer, count(res.key) from qtistatsresult res ")
.append(" inner join res.resultSet rset");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment