tags:

views:

55

answers:

1

Basically I have two models that are associated, but im building them to work both with and without an existing database (basically they degrade by not remembering settings). I can do $this->AssociatedModel->find() in my models when they are using a table, but for some reason I get

Undefined property: Model::$AssociatedModel [APP\plugins\pluginname\models\modelname.php, line 35]

When using $this->AssociatedModel->find('first', etc wwhen both have useTable set to false. It's as if the associated model's class isnt initialized without a table.

Here is a test case that neither fails nor pass, but has fatal error : http://bin.cakephp.org/view/942564952

A: 

I would have thought it would work fine. Check spelling. Can you paste your model association array, and the line of code causing the error.

neilcrookes
check my link that i edited in
Alexander Morland