I am upgrading cakephp 1.3 to 2.0

I am getting below error in error log

Error: [MissingTableException] Table aros_acos for model Permission was not found in   datasource default.
Exception Attributes: array (
  'table' => 'aros_acos',
  'class' => 'Permission',
  'ds' => 'default',
)
Request URL: /users/show?%2Fusers%2Fshow=

Stack Trace:
#0 /lib/Cake/Model/Model.php(3498): Model->setSource('aros_acos')
#1 /lib/Cake/Model/Datasource/DboSource.php(1063): Model->getDataSource()
#2 /lib/Cake/Model/Model.php(2902): DboSource->read(Object(User), Array)
#3 /lib/Cake/Model/Model.php(2874): Model->_readDataSource('count', Array)
#4 /app/Controller/Component/PaginationComponent.php(212): Model->find('count', 'status!='DL'')
#5 /app/Controller/UsersController.php(108): PaginationComponent->init('status!='DL'')
#6 [internal function]: UsersController->show()
#7 /lib/Cake/Controller/Controller.php(490):   ReflectionMethod->invokeArgs(Object(UsersController), Array)
#8 /lib/Cake/Routing/Dispatcher.php(185): Controller->invokeAction(Object(CakeRequest))
#9 /lib/Cake/Routing/Dispatcher.php(160): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#10 /app/webroot/index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))

UsersController.php error section

$criteria = "status!='1'";
$this->Pagination->direction = 'ASC';
$this->Pagination->sortBy = 'username';
//********
$this->Pagination->setPageLimit($page_limit);
list($order, $limit, $page) = $this->Pagination->init($criteria); // Added

PaginationComponent.php

 $count = $this->controller->{$this->modelClass}->find('count', $criteria);

Please let me know what is going wrong.

Thanks,

有帮助吗?

解决方案

Have you even tried to read and understand the error message? Debugging starts by reading (and understanding) error messages if you get some.

[MissingTableException] Table aros_acos for model Permission was not found in datasource default.

That means that the table aros_acos doesn't exist in your database.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top