added comments

This commit is contained in:
Timo Westkämper 2012-01-14 19:31:46 +02:00
parent df948b1da2
commit 85e5fb3bc1
2 changed files with 2 additions and 0 deletions

View File

@ -112,6 +112,7 @@ public abstract class AbstractHibernateSQLQuery<Q extends AbstractHibernateSQLQu
public Query createQuery(Expression<?>... args) {
for (int i = 0; i < args.length; i++) {
// create aliases for non path projections
// https://github.com/mysema/querydsl/issues/80
if (!(args[i] instanceof Path) && !(args[i] instanceof FactoryExpression)) {
args[i] = ExpressionUtils.as(args[i], "col"+(i+1));
}

View File

@ -105,6 +105,7 @@ public abstract class AbstractJPASQLQuery<Q extends AbstractJPASQLQuery<Q> & com
public Query createQuery(Expression<?>... args) {
for (int i = 0; i < args.length; i++) {
// create aliases for non path projections
// https://github.com/mysema/querydsl/issues/80
if (!(args[i] instanceof Path) && !(args[i] instanceof FactoryExpression)) {
args[i] = ExpressionUtils.as(args[i], "col"+(i+1));
}