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
The problem is because in every iteration the query is stacked
I solve using:
$this->repo->skipCriteria();
$this->repo->pushCriteria(new myCriteria());
I'm doing a criteria before a query like:
$all = $this->repo->findWhere(['status_id'=> $status->id, 'user_id'=> 1])->count();
my criteria is like this:
public function apply($model, Repository $repository)
{
$users = User::filtered()->lists('id')->toArray();
$model = $model->where('user_id', $users);
return $model;
}
the result of criteria is correct, but when I do the findWhere after it returns 0 (and should be return more)
The text was updated successfully, but these errors were encountered: