Hi.
I have User model, which have this relation:
'professional' => array(self::HAS_ONE, 'Professional', 'uid'),
and Professional model with this:
'proftypes'=>array(self::MANY_MANY, 'ProfType', 'profPropTypes(uid, user_type_id)'),
I,m trying to get proftypes property for curent user, i'm using
$user = User::model()->with('professional.proftypes')->findbyPk($id);
and then look up for $user->professional->proftypes property, but it is zero array
when i'm doing var_dump($user->professional), i'n getting:
[tt] ["_attributes":"CActiveRecord":private]=>
array(3) {
["id"]=>
string(1) "8"
["name"]=>
string( “Building”
["desc"]=>
NULL
}
[/tt]
,which in
[tt] ["_related":"CActiveRecord":private]=>
array(1) {
["proftypes"]=>
array(2) {
[0]=>
object(ProfType)#161 (10) {
[/tt]
how can i access this property?