I have enabled sfDoctrineGuardPlugin, so I have change myUser
class to my class extends sfGuardSecurityUser
.
I have overrided sfGuardUser schema to add my own relation
Personnage:
local: id
foreign: user_id
type: one
onUpdate: CASCADE
onDelete: CASCADE
When models are generated, if go on BasesfGuardUser.class.php, I can see in PHPDoc comments my relation is created and property Personnage has been added.
* @property Personnage $Personnage
But I don't understand when I try to access this property, I can't.
In controller :
$user = $this->getUser();
$user->Personnage;
In view :
echo $sf_user->Personnage
And the error :
Notice: Undefined property: myUser::$Personnage
How can I access to this property ?