{"action":"created","issue":{"url":"https://api.github.com/repos/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34","labels_url":"https://api.github.com/repos/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34/comments","events_url":"https://api.github.com/repos/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34/events","html_url":"https://github.com/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34","id":53244045,"number":34,"title":"Implement new field type","user":{"login":"bigfoot90","id":4598274,"avatar_url":"https://avatars.githubusercontent.com/u/4598274?v=3","gravatar_id":"","url":"https://api.github.com/users/bigfoot90","html_url":"https://github.com/bigfoot90","followers_url":"https://api.github.com/users/bigfoot90/followers","following_url":"https://api.github.com/users/bigfoot90/following{/other_user}","gists_url":"https://api.github.com/users/bigfoot90/gists{/gist_id}","starred_url":"https://api.github.com/users/bigfoot90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigfoot90/subscriptions","organizations_url":"https://api.github.com/users/bigfoot90/orgs","repos_url":"https://api.github.com/users/bigfoot90/repos","events_url":"https://api.github.com/users/bigfoot90/events{/privacy}","received_events_url":"https://api.github.com/users/bigfoot90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-01-02T09:31:59Z","updated_at":"2015-01-12T08:48:03Z","closed_at":null,"body":"I would propose to implement a [custom field type](http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html#custom-mapping-types), so you don't have to declare ```$uuid``` property explicitly.\r\n\r\nOld mapping:\r\n```php\r\nclass Entity\r\n{\r\n    /**\r\n     * @ORM\\Column(type=\"string\")\r\n     */\r\n    public $targetUuid;\r\n\r\n    /**\r\n     * @ODMAdapter\\ReferencePhpcr(\r\n     *  targetObject=\"Document\",\r\n     *  referencedBy=\"uuid\",\r\n     *  inversedBy=\"targetUuid\"\r\n     * )\r\n     */\r\n    public $target;\r\n}\r\n```\r\n\r\nNew mapping:\r\n```php\r\nclass Entity\r\n{\r\n    /**\r\n     * @ODMAdapter\\ReferencePhpcr(\r\n     *  targetObject=\"Document\",\r\n     *  referencedBy=\"uuid\"\r\n     * )\r\n     */\r\n    public $target;\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/comments/69541462","html_url":"https://github.com/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34#issuecomment-69541462","issue_url":"https://api.github.com/repos/ElectricMaxxx/DoctrineOrmOdmAdapter/issues/34","id":69541462,"user":{"login":"dbu","id":76576,"avatar_url":"https://avatars.githubusercontent.com/u/76576?v=3","gravatar_id":"","url":"https://api.github.com/users/dbu","html_url":"https://github.com/dbu","followers_url":"https://api.github.com/users/dbu/followers","following_url":"https://api.github.com/users/dbu/following{/other_user}","gists_url":"https://api.github.com/users/dbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbu/subscriptions","organizations_url":"https://api.github.com/users/dbu/orgs","repos_url":"https://api.github.com/users/dbu/repos","events_url":"https://api.github.com/users/dbu/events{/privacy}","received_events_url":"https://api.github.com/users/dbu/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T08:48:03Z","updated_at":"2015-01-12T08:48:03Z","body":"i am not aware of good documentation of the UoW. @Ocramius is working on a stand-alone UoW which should be a lot cleaner than what we currently have - and as a side effect should be able to handle cross-system references without any extra libraries.\r\n\r\ni am not familiar with \"common fields\" of the orm. maybe @Ocramius can help you here?"}}