doctrine/mongodb-odm — Issue #218: @Id(type="object")
Author: kriswallsmith
Created: 2011-12-24 04:44:23+00:00
State: open

I would like my objects to have an instance of `MongoId` on their id properties. This will allow me set an object's id in the constructor like so:

```php
id = new MongoId();
}
}
```

When the object would then be "upserted" when first flushed from the document manager.

MongoDB was designed to support this behavior, but (as far as I know) our ODM is not.