{"action":"created","issue":{"url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/282","labels_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/282/comments","events_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/282/events","html_url":"https://github.com/dunglas/DunglasApiBundle/issues/282","id":107776228,"number":282,"title":"Composite identifiers don't work","user":{"login":"felicitus","id":162974,"avatar_url":"https://avatars.githubusercontent.com/u/162974?v=3","gravatar_id":"","url":"https://api.github.com/users/felicitus","html_url":"https://github.com/felicitus","followers_url":"https://api.github.com/users/felicitus/followers","following_url":"https://api.github.com/users/felicitus/following{/other_user}","gists_url":"https://api.github.com/users/felicitus/gists{/gist_id}","starred_url":"https://api.github.com/users/felicitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felicitus/subscriptions","organizations_url":"https://api.github.com/users/felicitus/orgs","repos_url":"https://api.github.com/users/felicitus/repos","events_url":"https://api.github.com/users/felicitus/events{/privacy}","received_events_url":"https://api.github.com/users/felicitus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dunglas/DunglasApiBundle/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-22T18:44:13Z","updated_at":"2015-09-23T12:12:32Z","closed_at":null,"body":"Hi,\r\n\r\nI have an entity which uses composite identifiers:\r\n\r\n```\r\nclass UserPreference\r\n{\r\n    /**\r\n     * Defines the key of the user preference\r\n     * @ORM\\Column(type=\"string\",length=255)\r\n     * @ORM\\Id\r\n     *\r\n     * @Groups({\"default\"})\r\n     *\r\n     * @var string\r\n     */\r\n    private $preferenceKey;\r\n\r\n    /**\r\n     * Defines the value. Note that the value is internally stored as a serialized string.\r\n     *\r\n     * @ORM\\Column(type=\"text\")\r\n     *\r\n     * @Groups({\"default\"})\r\n     * \r\n     * @var mixed\r\n     */\r\n    private $preferenceValue;\r\n\r\n    /**\r\n     * Defines the user\r\n     * @ORM\\ManyToOne(targetEntity=\"PartKeepr\\AuthBundle\\Entity\\User\")\r\n     *\r\n     * @ORM\\Id\r\n     * @var \\PartKeepr\\AuthBundle\\Entity\\User\r\n     */\r\n    private $user;\r\n```\r\n\r\nWhen attempting to use it, I receive the following error:\r\n\r\n```\r\nThe class \\PartKeepr\\AuthBundle\\Entity\\\\UserPreference has no identifier.\r\n```\r\n\r\nI assume that it's hard to implement composite identifiers, so I propose to change the exception message to reflect that, something like \"Composite identifiers detected, unable to use\"."},"comment":{"url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/comments/142581153","html_url":"https://github.com/dunglas/DunglasApiBundle/issues/282#issuecomment-142581153","issue_url":"https://api.github.com/repos/dunglas/DunglasApiBundle/issues/282","id":142581153,"user":{"login":"ogizanagi","id":2211145,"avatar_url":"https://avatars.githubusercontent.com/u/2211145?v=3","gravatar_id":"","url":"https://api.github.com/users/ogizanagi","html_url":"https://github.com/ogizanagi","followers_url":"https://api.github.com/users/ogizanagi/followers","following_url":"https://api.github.com/users/ogizanagi/following{/other_user}","gists_url":"https://api.github.com/users/ogizanagi/gists{/gist_id}","starred_url":"https://api.github.com/users/ogizanagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogizanagi/subscriptions","organizations_url":"https://api.github.com/users/ogizanagi/orgs","repos_url":"https://api.github.com/users/ogizanagi/repos","events_url":"https://api.github.com/users/ogizanagi/events{/privacy}","received_events_url":"https://api.github.com/users/ogizanagi/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T12:12:32Z","updated_at":"2015-09-23T12:12:32Z","body":"Using the `dev-master`, we used an item query extension in order to achieve this at the `DataProvider` level."}}