Skip to content

Commit

Permalink
fix(QueryBuilder): Added options structure to count() method call in …
Browse files Browse the repository at this point in the history
…paginate

The paginage() method calls count() but does not pass along the options argument which will throw an error if the user needs to specify custom query options like "datasource".
  • Loading branch information
homestar9 committed Jun 27, 2020
1 parent 2fb5ccf commit 99201fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/Query/QueryBuilder.cfc
Expand Up @@ -2028,7 +2028,7 @@ component displayname="QueryBuilder" accessors="true" {
* @return PaginationCollector
*/
public any function paginate( numeric page = 1, numeric maxRows = 25, struct options = {} ) {
var totalRecords = count();
var totalRecords = count( options = options );
var results = forPage( page, maxRows ).get( options = options );
return getPaginationCollector().generateWithResults(
totalRecords = totalRecords,
Expand Down

0 comments on commit 99201fb

Please sign in to comment.