couchdb-odm
couchdb-odm copied to clipboard
Set "type" for document
Bundle saves and searches documents with the type field which equals to the document class name, for example "Acme.DemoBundle.CouchDocument.Settings".
Is there any way to set custom "type", for example:
/**
* @CouchDB\Document(type="Settings")
*/
class Settings
{
/**
* @CouchDB\Id
*/
protected $id;
}
Doctrine MongoDB ODM uses a customisable discriminator map, which does just this. Maybe a similar feature could be implemented in Doctrine CouchDB ODM?