I have experience in using cakephp 2 but i have no idea in cakephp 3.
My database admin keep creating database table with uppercase name even in column name, so i have to make cakephp model with custom table/view name.
<?php
namespace App\Model\Table;
use Cake\ORM\Table;
class ListCrewBooking extends Table
{
public function initialize(array $config)
{
$this->table('VW_CREW_ON_DUTY');
}
}
and then i want to preview it on a controller directly without a cake view (using die();)
class TestController extends AppController
{
function index(){
$this->viewBuilder()->layout = false;
$this->loadModel('ListCrewBooking');
$data = $this->ListCrewBooking->find('all');
pr($data);
die();
}
}
and then an error comes out
Cannot describe list_crew_booking. It has 0 columns.
Why this is happened? and how to solve this? i have no clue what is going on.
ps: the view have 5000 rows and many columns
Thank you for any reply