Search related data in different data base

Hi.

I have an app which need to connect some tables. I can join them simply and search for data in related fields. I am doing it by adding the connection like this>


public function getNextTab()

	

	{

	           

    return 	$this->hasOne(NextTab::className(),['id' =>'id_nexttba']);	

		

		

	}

and ask for the data in search model using like this ->


->where ('id'='ok') ->

->joinWith('nextTab')

->joinWith('nextTab.nextTab')

->joinWith('nextTab.nextTab.nextTab'); 

My problem is when I try to do this with tables from different database. The query is give me error like

SQLSTATE[42S02]: Base table or view not found:

any tips how to pass it?