Permalink
Browse files

fix(QueryBuilder): use alias instead of property name

  • Loading branch information...
RWOverdijk committed Feb 20, 2017
1 parent 269b460 commit 1818f1ac508c4dea6690777dd4c2c7577f61d5b2
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/QueryBuilder.ts
@@ -618,7 +618,7 @@ export class QueryBuilder<T> {
// Support select functions. Don't add to hydrator, as they aren't part of the entities.
let select = Object.getOwnPropertyNames(propertyAlias);
let functionName = select[0] === 'alias' ? select[1] : select[0];
let alias = select[0] === 'alias' ? select[0] : select[1];
let alias = propertyAlias[select[0] === 'alias' ? select[0] : select[1]];
let fieldName = this.whereCriteria.mapToColumn(propertyAlias[functionName]);
if (this.functions.indexOf(functionName) === -1) {

0 comments on commit 1818f1a

Please sign in to comment.