doctrine/mongodb-odm — pull request #626 by Parad0X (2013-07-02 22:13:21+00:00)
Title: Adds support for discriminatorField/discriminatorMap for ReferenceOne.

So ReferenceOne with discriminator map/type doesn't seem to be working. It's not saving the type. This is what my mapping file looks like:

```
referenceOne:
model:
discriminatorField: model_type
discriminatorMap:
user: Blah\Bundle\UserBundle\Model\User
reservation: Blah\Bundle\WebBundle\Model\Reservation
```

And all I have in the DB is:

```js
{ ... "model" : DBRef("reservations", ObjectId("51cf0b65d0c3f5661000001a")) ... }
```

model_type is not set.

This pull request fixes this issue by saving the type.

Before I spend any more time on this could someone take a quick look and tell me if I'm going in the right direction.