How to organize a request yii2?

there are 3 tables , one of them linking table.
made here such request:
$dr = Driver::find()->joinWith('idTrips')
 ->where(['not', ['Date_end' => null]])
 ->all();

idTrips - getter to relate the tables (it works like a clock)
The problem is that, if any records of Driver will find more records from a connected table and they will be like this :
[0] => ['Date_end' => '2014'],
[1] => ['Date_end' => null],
then the condition where(['not', ['Date_end' => null]]) work as 'Date_end' => null
I need to see if at least one value is null , then not to take it!
July 9th 19 at 10:08
1 answer
July 9th 19 at 10:10
Solution
Try this

['is not', 'attribute', null]
thank you - watson_Torphy commented on July 9th 19 at 10:13

Find more questions by tags Yii