Symfony and Doctrine2 - get info from annotations -
i have entity user field username (with appriopriate getter , setter) maps field user_name in table users. in userrepository fetch 1 record database , have $user of class user. how can find out table , field name $user->username ? need somehow fetch information annotations. found information in doctrine2 cache , found class classmetadatainfo documentation don't know how put together.
you should able class metadata of specific class doing so:
$entitymanager->getclassmetadata(get_class($user))  
Comments
Post a Comment