I am working through part4 of Symfony2, and while updating the controller and helper class code i got the following error message
Undefined method \'getLates
In my case adding proper annotation was insufficient.
Deleting Doctrine Cache by php app/console doctrine:cache:clear-metadata also not worked.
I generate my entities from database by commands
php app/console doctrine:mapping:import --force AcmeBlogBundle xml
php app/console doctrine:mapping:convert annotation ./src
php app/console doctrine:generate:entities AcmeBlogBundle
First command generate orm.xml file for each DB Table in my project. After DELETING all orm.xml files Annotations started work properly.