title: Fetch highest ID from database via Doctrine
body: <p>After trying a lot of howto's on Google I am still without answers.</p>
  <p>I want to fetch an object from the database which has the highest ID (ai).
  I know this must be very simple to do, but I couldn't find the solution.</p>
  <p>In the database I have the entities <strong>Syncs</strong> which have an auto-increment ID.
  I need that (latest) object to retrieve the value <code>&lt;end&gt;</code> which is a DateTime.</p>
  <p>(It is in Symfony via Doctrine by the way.)</p>