Undefined property: ModelTask::$useDbConfig
in CakePHP book example here I try: cake bake all then I choose 1 for Group
but i get an error
Notice: Undefined 开发者_开发知识库property: ModelTask::$useDbConfig in /opt/lampp/htdocs/acl_cake/cake/console/libs/tasks/model.php on line 848
Fatal error: ConnectionManager::getDataSource - Non-existent data source in /opt/lampp/htdocs/acl_cake/cake/libs/model/connection_manager.php on line 109
I solved the problem temporarily by adding
$this->useDbConfig = 'default';
at line 848 of the file cake/console/libs/tasks/model.php before the instruction
$data = $schema->read(array('models' => false, 'connection' => $this->useDbConfig));
And now the bake all is working.
精彩评论