How to set Data source within Table Model file In Cake 3 ?

Viewed 2027

In cake 2 I could set it with this $this->setDataSource('database_name'); and create property of the same name in the Config\database.php

In CakePHP 3 I have added an additional Datasource in app.php after default but unable to use $this->setDataSource( within the initialize. I get Unknown method "setDatasource".

1 Answers
Related