Fix for #174 - Incorrect SQL generated with syntax error at the "order by" clause

This commit is contained in:
rbygrave
2014-07-21 21:49:31 +12:00
parent 562c6fafc9
commit f7ece0f13c
7 changed files with 218 additions and 29 deletions
@@ -291,6 +291,7 @@ public class SqlTreeBuilder {
// remove ManyWhereJoins from the predicateIncludes
predicateIncludes.removeAll(manyWhereJoins.getPropertyNames());
predicateIncludes.addAll(predicates.getOrderByIncludes());
// look for predicateIncludes that are not in selectIncludes and add
// them as extra joins to the query