Listo ya lo hice pero me sale este mensaje de error:
 
Impossible to access an attribute ("nombres") on a string variable ("Nelson Andres").    
Código PHP:
Ver originalpublic function viewAction($id)
    {
        $mascota = $this->getDoctrine()
            ->getRepository('PPPCanBundle:Mascota')
            ->find($id);
        
        $propietarioNombres = $mascota->getPropietario()->getNombres();
 
        if(!$mascota)
        {
            throw $this->createNotFoundException('Mascota no encontrada.');
        }
 
        return $this->render('PPPCanBundle:Mascota:view.html.twig', array('mascota' => $mascota,             'propietarioNombres' => $propietarioNombres));
    }
  
    Aque se debe este error?