If your models are using different datasources you have to set the
'external' attribute in the association (I think).
On Dec 11, 9:28 am, Zwift <[EMAIL PROTECTED]> wrote:
> 2 Models
> FIRST:
>
> class LocalNumber extends AppModel {
> var $useDbConfig = 'prepaid';
> var $useTable = 'cards';
> var $primaryKey = 'number';
> var $displayField = 'number';
> var $name = 'LocalNumber';
> var $recursive = 2;
>
> var $hasOne = array(
> 'LocalAccount' => array(
> 'ClassName' => 'LocalAccount',
> 'foreignKey' => 'local_number_id'
> )
> );
>
> }
>
> SECOND:
> class LocalAccount extends AppModel {
>
> var $name = 'LocalAccount';
>
> var $belongsTo = array(
> 'LocalNumber' => array('className' => 'LocalNumber',
> 'foreignKey' => 'local_number_id')
> );
>
> }
>
> And I have no idea why its not working - LocalNumber just doesn't
> appear in view (view and controller were baked).
> Any ideas? Maybe I did something wrong??
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---