Update src/DoctrineModule/Form/Element/Proxy.php

Using `UnitOfWork::getEntityIdentifier()` to get the identifier without lazy-loading if `$value` is a proxy.
Update src/DoctrineModule/Form/Element/Proxy.php

restoring current()
Update src/DoctrineModule/Form/Element/Proxy.php

Replace metadata with `UnitOfWork`
Tolerate collection getters returning an array
Tolerate collection getters returning an array
Tolerate collection getters returning an array
Tolerate collection getters returning an array
Revert "Update src/DoctrineModule/Form/Element/Proxy.php"

This reverts commit 08ba51c2d9fd51492fb67f2b38c03729a94112b6.
Revert "Update src/DoctrineModule/Form/Element/Proxy.php"

This reverts commit 8cb8ac229dc4585f3cf44da47a099149889bb94b.
Revert "Update src/DoctrineModule/Form/Element/Proxy.php"

This reverts commit 78a31f56c05f203823fd6f61e2f42b66c0d0f508.