I am trying to use Twig
templates to display some objects fetched with Doctrine 1
. I face an issue when accessing a relation declared with hasMany
in the setUp
function of the User
class. In my PHP code I can do a $user->Instance
without any issue but if I pass $user
to the template and try to do a user.Instance
an exception is raised:
Doctrine_Record_Exception' with message 'Unknown method User::Instance'
How can I solve this?
Thanks,
PS: using user.get('Instance')
seems to work though I would of course prefer to avoid it