this is my custome query:
$query = $em->createQuery("SELECT max(d.id) FROM MyBundle:DBTableEntity d ");
$max_incoming_id = $query->execute();
I want it to return the Entity Object, just like this one below:
$EntityObj = $resource->getRepository("MyBundle:DBTableEntity")->findAll();
Any idea how to do that?