A sample code for doctrine2  entity manager