When setting up annotations with Doctrine ODM for the id field of a document you can specify a different key generation strategy that the default MongoId method like so:
/** @ODM\Document(collection="documents") */
class Document
{
/**
* @ODM\Id(strategy="UUID")
*/
protected $id;
}
This requires you to specify this strategy for every new document mapping you set up. Is it possible to change the default strategy for your entire application? Maybe via a configuration option at the connection level?