Hi, this is a test function, bevaus I always get an error in the normal environment.
The error message is:
Undefined property: Cake\ORM\Query::$name [APP/Controller\JournalsController.php, line 237]
If I use ->get($id) instaed of find it works. Crazy I have many selections with find, but this is the first one not working. Any suggestions?
public function testCapital() {
$accTable = TableRegistry::get(‘Accounts’);
$acc = $accTable->find()
->where([‘account_no’ => “P1001”])
->where([‘year’ => 2017]);
echo $acc->name;
return $this->redirect(['action' => 'index']);
}