doctrine/mongodb-odm — pull request #705 by lemoinem (2013-11-15 22:41:38+00:00)
Title: Makes the UnitOfWork#getOrCreateDocument to use DocumentManager#getClassNameFromDiscriminatorValue in order to resolve the discriminator value

This doesn't break any test and provide a uniform behaviour throughout the Framework with respect to the Discriminator Map interpretation.

I'd also suggest moving the method to the UnitOfWork class, I fail to see why this is required to be in the DocumentManager and looks more like internal behaviour than an external API'ed primitive.

My final goal is to make extending the DiscriminatorMap related behaviour easier.

I needed that for a project of mine which required a pretty extensive (and invasive) enhancement of the whole ODM and Connection (MongoDB layer) libraries.

I'm writing a post-mortem blog post on it detailing the process and enhancements I made, along with several suggestion to make such extensions easier in the future. I will keep you posted with respect to that if you are interested in it.