This bug was encountered using a DateTime type as an @Id, but it appears that it will affect any type of custom data type if it is an object.
Doctrine\ORM\Id\AssignedGenerator checks to see if the key is an object. If so it does a look up in the identity map to find the object, but in the case of DateTime it will not find it and throws an exception. It is appears this is the case for both singular and composite keys as shown in the attached test.
Offending code: https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Id/AssignedGenerator.php#L52
Test case forthcoming.