fix: added forCount conditional statement for skip transform logic when countQuery

This commit is contained in:
heesuk 2020-05-07 14:26:43 +09:00
parent a12bc5b65c
commit db7f0528c2

View File

@ -158,7 +158,7 @@ public abstract class AbstractJPASQLQuery<T, Q extends AbstractJPASQLQuery<T, Q>
JPAUtil.setConstants(query, serializer.getConstantToAllLabels(), queryMixin.getMetadata().getParams());
this.projection = null; // necessary when query is reused
if (projection instanceof FactoryExpression) {
if (!forCount && projection instanceof FactoryExpression) {
if (!queryHandler.transform(query, (FactoryExpression<?>) projection)) {
this.projection = (FactoryExpression<?>) projection;
}