From within a Doctrine record class, querying for the same record from the DB overwrites the properties within that class
<p>In one of my Doctrine record classes, I have a <code>preSave</code> method that performs a check. In this check, a query is done on the same table that my record belongs to. This query will fetch one record from the table, and I use the hydrated result to compare to the current record represented by the class. </p>

<p>In some cases, the fetched hydrated result will be the same record as the one I'm working with in the <code>preSave</code> check. However, when this happens, any changes that I've made to the first record are reverted once the query is completed.</p>

<p>Why does this happen? Is there a workaround?</p>