title: Doctrine SQL Server uniqueidentifier isn't cast as char or nvarchar when retrieved from the database
body: <p>When I retrieve a record from the database which has a column of type "uniqueidentifier", Doctrine fills it with "null" rather than the unique id from the database. </p>
  
  <p>Some research and testing has brought this down to a PDO/dblib driver issue. When directly querying via PDO, null is returned in place of the unique id.</p>
  
  <p>For reference, <a href="http://trac.doctrine-project.org/ticket/1096" rel="nofollow noreferrer">http://trac.doctrine-project.org/ticket/1096</a>, has a bit on this, however, it was updated 11 months ago with no comment for resolution.</p>
  
  <p>A way around this, as mentioned at <a href="http://bugs.php.net/bug.php?id=24752&amp;edit=1" rel="nofollow noreferrer">http://bugs.php.net/bug.php?id=24752&amp;edit=1</a>, is to cast the column as a char. However, it doesn't seem Doctrine exposes the native field type outside of generating models which makes it a bit hard to detect uniqueidentifier types and cast them internally when building the sql query.</p>
  
  <p>Has anyone found a workaround for this?</p>