Wrong request relational db

Hello all,

I have this relation in my model:





    public function getDestinos($idSec) {

      return $this->hasMany(Destino::className(), ['idBloDes' => 'idBlo'])

      ->where('idSecDes = :idSec', [':idSec' => $idSec])

      ->orderBy('idBloDes')->all();

    }



But, Yii make this query:


SELECT * FROM `Destino` WHERE (idSecDes = 1) AND (0=1) ORDER BY `idBloDes`

Why add "AND (0=1)"?

use andWhere