Please help me with this: am I missing something?
I am getting following error:
Notice (8): Undefined property: Property::$Project [APP\controllers\properties_controller.php, line 614]
// This is code where warning occurs
$projects = $this->Property->Project->find('list');
and in project.php (model file)
var $hasMany = array(
'Property' => array(
'className' => 'Property',
'foreignKey' => 'project_id',
'dependent' => true,
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'exclusive' => '',
'finderQuery' => '',
'counterQuery' => ''
)
);
Add in property.php var $belongsTo = 'Project'.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With