Why can't I save the query parameters in Kohana ORM?

Can't understand why this code does not work reset(FALSE) ? Comes an empty response. Of course, if the find_all call immediately in the same line where you set the parameters, all works well.

if($prop == "shipping")
{
 $clients = ORM::factory('client')
 ->where('prop_retail', '=', 1)
 ->order_by('id', 'DESC');
$clients->reset(FALSE);

}
 elseif($prop == "delivery")
{
 $clients = ORM::factory('client')
 ->where('prop_retail', '=', 2)
 ->order_by('id', 'DESC');
$clients->reset(FALSE);

}
 elseif($prop == "office")
{
 $clients = ORM::factory('client')
 ->where('prop_retail', '=', 3)
 ->order_by('id', 'DESC');
$clients->reset(FALSE);
}
 $clients->find_all();
September 26th 19 at 11:46
1 answer
September 26th 19 at 11:48
Solution
Example

$posts = ORM::factory("post") -> reset(false); /// Here it is!
$posts = $posts -> where("published","=",1);
// On screw-on filters
if(......){
 $posts = $posts->where( ..........);
}
.........................

$count = $posts - >count_all();

// Now nothing is lost
$posts = $posts -> limit(10)->offset(30)-> find_all();
Wonderful, thank you very much. - caesar_Wolf commented on September 26th 19 at 11:51

Find more questions by tags Kohana