My code,
$collection = Yii::$app->mongodb->getCollection('cases');
$condition = ['NOT', ['_id', $model->_id]];
$result = $collection->buildCondition($condition);
Results in an error “Operator ‘NOT’ requires two operands.”
I get the same error when building a find query as such:
Cases::find()->where(['NOT', ['_id' => $model->_id]])->all()
I am following the guide and documentation to the letter and yet still errors, any help would be much appreciated,
Thanks