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

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -