Remove unused call to spl_object_hash()

The resulting variable $oid is never used.
Fixing typo in docs
Merge pull request #723 from lunetics/patch-1

Fixing typo in docs
Show yml mapping type in examples
Merge pull request #727 from iampersistent/patch-1

Show yml mapping type in examples
Merge pull request #722 from Danez/patch-1

Remove unused call to spl_object_hash()
Discriminator fields are not mapped; ClassMetadata property change

Discriminators defined at the document level allowed separate name/fieldName options for database/PHP names, respectively. Association discriminators are only defined with a single database name.

For BC, allow document-level mappings to still use "fieldName", but give priority to "name". In ClassMetadata, only a single string (the database name) will be stored, as is already done for association mappings.
Set default discriminator field in ClassMetadataInfo

This adds a constant in ClassMetadataInfo, which means the default field will no longer need to be hard-coded elsewhere in ODM.
Move DocumentManager discriminator resolution method to UnitOfWork

This moves DocumentManager::getClassNameFromDiscriminatorValue() to UnitOfWork::getClassNameForAssociation(). Since the default discriminator field is now set in ClassMetadataInfo, it no longer needs to be hard-coded. DocumentManager::createDBRef() has also been refactored a bit.
Use discriminator value as class name if not found in map

This changes discriminator resolution using the ClassMetadata's map to match that of association mappings. If the discriminator value is not found in the map, the value itself should be used as the class name.
Remove index test for mapped discriminator field, which is unsupported

Indexing a discriminator field will require defining the index at the document level, using the database name.
Consistent class/association discriminator field parsing in YamlDriver

This adds a common helper method to parse discriminatorField options consistently for classes and associations in YamlDriver. Give precedence to string values, and then check the "name" or "fieldName" keys (in that order) for an array value. Exceptions will be thrown otherwise.

Fixes #657.
Revise documentation for discriminators and inheritance types
Fix typo in documentation link
Remove trailing whitespace
Rewrite docs on Collection interfaces for references
Merge pull request #720 from doctrine/discriminator-refactor

Refactor discriminator field mapping, persistence, and hydration
Use default db/collection names in functional tests
Use BaseTest for UnitOfWorkTest

This avoids using a default connection, which writes to the "doctrine" database instead of the test database.
Use default db/collection names in test models