doctrine/DoctrineModule — pull request #129 by texdc (2012-12-08 01:25:11+00:00)
Title: Get identifier from uninitialized entity proxies

Fix for #122.

Replace `$om->getClassMetadata()` with `$om->getUnitOfWork()` to gracefully get the entity identifier from uninitialized entity proxies without triggering a lazy-load.

This is based on the answer to this SO question:
http://stackoverflow.com/questions/8211679/can-you-get-a-foreign-key-from-an-object-in-doctine2-without-loading-that-object