You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments