• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Model whereIn() Misbehaviour in 4.0.4

I’m having some problems getting the builder functionality in a Model to work:

If I use this bit of code in a controller:
$query = $model->where('id', $ id)->whereIn('xxx', $yyy)->paginate(NULL, 'group', $page_current, $url_segment);

I find that I have a long list of items presented in $query… where it appears that the whereIn() functionality is not being propagated to the result.

If the output of the pagination() function (in system Model.php) is dumped using:
public function paginate(…)
{ …
  var_dump($this->findAll($perPage, $offset));
  return $this->findAll($perPage, $offset);

I find that the few items that SHOULD be filtered out actually HAVE BEEN… so there seems to be some weird breakdown in the whereIn() functionality that inhibits the propagation of its action to the end result (though, strangely enough, its effect does seem to be present in the paginate() function?!?

Could someone explain this to me, or shed some light on what’s causing it and how to best handle it?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.