aslan
(Aslan Shek)
1
hi guys,
i am using Yii-user extension: http://www.yiiframework.com/extension/yii-user
now i want to relate this user model to other models, so i write codes as the follow
in UserModule.php
public $relations = array(
'notes' => array(self::HAS_MANY, 'Note', 'learner_id'),
'profile' => array(self::HAS_ONE, 'Profile', 'user_id'),
);
but it doesnt work. please help me !
xahgmah
(Xahgmah)
2
You must write it in User model class. Not , in UserModule.php