{"action":"closed","issue":{"url":"https://api.github.com/repos/zfcampus/zf-apigility-doctrine/issues/273","repository_url":"https://api.github.com/repos/zfcampus/zf-apigility-doctrine","labels_url":"https://api.github.com/repos/zfcampus/zf-apigility-doctrine/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/zfcampus/zf-apigility-doctrine/issues/273/comments","events_url":"https://api.github.com/repos/zfcampus/zf-apigility-doctrine/issues/273/events","html_url":"https://github.com/zfcampus/zf-apigility-doctrine/issues/273","id":176748346,"number":273,"title":"Entity Hal and Versioning Problems","user":{"login":"wshafer","id":1828455,"avatar_url":"https://avatars.githubusercontent.com/u/1828455?v=3","gravatar_id":"","url":"https://api.github.com/users/wshafer","html_url":"https://github.com/wshafer","followers_url":"https://api.github.com/users/wshafer/followers","following_url":"https://api.github.com/users/wshafer/following{/other_user}","gists_url":"https://api.github.com/users/wshafer/gists{/gist_id}","starred_url":"https://api.github.com/users/wshafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wshafer/subscriptions","organizations_url":"https://api.github.com/users/wshafer/orgs","repos_url":"https://api.github.com/users/wshafer/repos","events_url":"https://api.github.com/users/wshafer/events{/privacy}","received_events_url":"https://api.github.com/users/wshafer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-13T21:00:27Z","updated_at":"2016-10-07T18:32:20Z","closed_at":"2016-10-07T18:32:20Z","body":"Hey Guys,\r\n\r\nI'm having an issue as I attempt to lock down our API's version 1 and create a new version 2.  \r\n\r\nThe issue I'm running into is that zf-hal only allows one hydrator per instance, so when creating a doctrine connected resource adds a line like:\r\n\r\n```\r\n            'Db\\\\Entity\\\\User' => array(\r\n                'route_identifier_name' => 'user_id',\r\n                'entity_identifier_name' => 'id',\r\n                'route_name' => 'myapi.rest.doctrine.user',\r\n                'hydrator' => 'MyApi\\\\V1\\\\Rest\\\\User\\\\UserHydrator',\r\n                'max_depth' => 2,\r\n            ),\r\n```\r\n\r\nWith our V2 we actually need different hydrators for these entities, for each version.  Currently with this setup, this doesn't appear possible.  Not without versioning my entities and creating another ORM to process these."}}
{"actor":{"display_login":"wshafer"}}