Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($Paginator): clone a query builder to prevent mutating the actual…
… passed one currently, the paginate function takes a query builder and mutates the query builder it takes, This behavior can be problematic if someone intends to use the query builder again after passing it to paginate function ex. getting the total count with or after pagination. this commit contains fixes on both paginator class and tests - contains a fix to the issue by just cloning the passed query builder with the class SelectQueryBuilder that clones the query builder with its query runner. - contains a refactor to the paginator tests by not using the clone method anymore when passing the same query builder to multiple paginate function.
- Loading branch information