Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Set "type" for document #98

Open
likebtn opened this issue Aug 20, 2014 · 1 comment
Open

Set "type" for document #98

likebtn opened this issue Aug 20, 2014 · 1 comment

Comments

@likebtn
Copy link

likebtn commented Aug 20, 2014

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;
}
@SteveTalbot
Copy link

Doctrine MongoDB ODM uses a customisable discriminator map, which does just this. Maybe a similar feature could be implemented in Doctrine CouchDB ODM?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants