doctrine/mongodb-odm — pull request #720 by jmikola (2013-12-16 12:42:26+00:00)
Title: [WIP] Refactor discriminator field mapping, persistence, and hydration

This PR was originally prompted by #705, which highlighted some inconsistencies in how ODM works with discriminators.

Discriminator fields are never hydrated, so they need only be configured as a single database field name (e.g. the `name` option). The PHP property name (`fieldName`) is not needed. Association discriminators already behaved this way (single name option), but document-level discriminators did not. This PR changes that. ClassMetadata will only track a single string value for a discriminator field, but the mapping drivers will still accept a `fieldName` option in the absence of `name` for BC.