I have models that have various
hasOne stated, however, those have soft delete columns and want to only return it if
deleted is null.
Is there either a way of doing that through the definition?
Or is there a way I can do a condition somewhere else?
$this->hasOne('id', Test::class, 'testId', [ 'conditions' => 'deleted IS NULL', 'alias' => 'test', ]); $model->getTest(['conditions' => 'deleted IS NULL']);