the prob is in this line
public function whereStatements($select)
{
if ($this->_filters) {
foreach ($this->_filters as $filterName => $filter) {
if ($this->isFieldWithRelationNtoN($filterName)) {
$rel = $this->_relation_n_n[$filterName];
$select->join($rel->junctionTable,
$rel->junctionTable . '.' . $rel->primaryKeyJunctionToCurrent . '=' .
$this->tableName . '.' . $this->getPrimaryKeyField($this->tableName). '',
[]
);
if (is_array($filter)) {
$predictateSetArray = [];
foreach ($filter as $primaryKeyId) {
$predictateSetArray[] = new Predicate\Operator(
$rel->junctionTable . '.' . $rel->primaryKeyToReferrerTable, '=' , $primaryKeyId
);
}
if (!empty($predictateSetArray)) {
$select->where(new Predicate\PredicateSet($predictateSetArray, PredicateSet::OP_OR));
}
} else {
$select->where([
$rel->junctionTable . '.' . $rel->primaryKeyToReferrerTable => $filter
]);
}
}
}
// @todo: Remove duplicate code with the above filters
} else if ($this->_filters_or) {
foreach ($this->_filters_or as $filterName => $filter) {
if ($this->isFieldWithRelationNtoN($filterName)) {
$rel = $this->_relation_n_n[$filterName];
$select->join($rel->junctionTable,
$rel->junctionTable . '.' . $rel->primaryKeyJunctionToCurrent . '=' .
$this->tableName . '.' . $this->getPrimaryKeyField($this->tableName). '',
[]
);
if (is_array($filter)) {
$predictateSetArray = [];
foreach ($filter as $primaryKeyId) {
$predictateSetArray[] = new Predicate\Operator(
$rel->junctionTable . '.' . $rel->primaryKeyToReferrerTable, '=' , $primaryKeyId
);
}
if (!empty($predictateSetArray)) {
$select->where(new Predicate\PredicateSet($predictateSetArray, PredicateSet::OP_OR));
}
} else {
$select->where([
$rel->junctionTable . '.' . $rel->primaryKeyToReferrerTable => $filter
]);
}
}
}
}
on the first if , we can see clear that the operator is OP_OR . it should be and operator .and even ,the prob is still because the query is wrong . plz i need a fix to this . ty for your help