Hi,
I have in my model this relathions code:
'license' => array(self::BELONGS_TO, 'License', 'license_id'),
In my model`s table I have license_id column and I have a License model…
In a view file I wrote
<?php echo $model->license->id; ?>
And I got error: Trying to get property of non-object.
Why is that happens? I have another relations (belongs_to
!) in the same model that works…
tnx!