Skip to content

Commit

Permalink
Merge branch 'hotfix-10.8.68' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWatson committed Jan 18, 2018
2 parents 4c7c88f + 20c6717 commit f6c0df6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ component {
, getSqlAndParamsOnly = true
);
var subQueryParams = {};
var subQueryAlias = "manyToManyCount" & CreateUUId().lCase().replace( "-", "", "all" );
var filterSql = "#subQueryAlias#.onetomany_count ${operator} 0";
var subQueryAlias = "oneToManyHas" & CreateUUId().lCase().replace( "-", "", "all" );
var filterSql = "";

for( var param in subQuery.params ) {
subQueryParams[ param.name ] = param;
}

if ( _is ) {
filterSql = filterSql.replace( "${operator}", ">" );
filterSql = "#subQueryAlias#.onetomany_count > 0";
} else {
filterSql = filterSql.replace( "${operator}", "=" );
filterSql = "( #subQueryAlias#.onetomany_count is null or #subQueryAlias#.onetomany_count = 0 )";
}

var prefix = filterPrefix.len() ? filterPrefix : ( parentPropertyName.len() ? parentPropertyName : objectName );
Expand Down

0 comments on commit f6c0df6

Please sign in to comment.