Adding a where condition
Closed this issue · 2 comments
erralb commented
Hi,
Is it possible to add a ->where('col','=','something') ORM condition to a paginate object ?
morgan commented
Hello @ierpe,
You can apply the "where" condition to the ORM object prior to passing it into Paginate. If you reference the documentation (http://dev.morgan.ly/kohana/v3.3/index.php/guide/paginate/basics), you'll see where the ORM object is created. Just manipulate the object as needed and then pass it into Paginate. Just make sure to pass the ORM object without executing it (calling find, etc), since Paginate is responsible for pulling the result.
Please let me know if you have any questions.
Thank you.
erralb commented
Thanks for the answer!