yii2tech/filedb

missing ActiveQuery::getTableNameAndAlias() method

Closed this issue · 2 comments

I get the following error:
Calling unknown method: yii2tech\filedb\ActiveQuery::getTableNameAndAlias()

I use yii 2.0.13.1
The implementatio is as follow

$gettoni = AgentePagamentoGettone::find()->where($filter)->joinWith('tipoFornitura')->all();

tipoFornitura relation is as follow TipoFornitura is filedb and contratto is a mysql table

    public function getTipoFornitura()
    {
        return $this->hasMany(TipoFornitura::className(), ['id' => 'tipoFornitura_id'])
            ->via('contratto');
    }

Dunno if you need more info but looking at the file but getTableNameAndAlias is simply missing

This is obviously not work as TipoFornitura has no database table associated with it.
Thus joinWith() fails over it. Use regular with() instead.

Shame on me, didn't look properly to my code.