doctrine/doctrine2 — pull request #364 by Burgov (2012-06-06 09:25:14+00:00)
Title: set initialized => true only after actually initializing

I have a situation where I run into the EntityNotFound exception because of a filter which filters out entities with "deleted = 1". I catch this exception and display an error. However, in the next loop, when I try to catch the error again, it is not thrown, as __initialized__ is already set to true. The entity, however, is not in fact initialized