{"action":"created","issue":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3337","labels_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3337/labels{/name}","comments_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3337/comments","events_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3337/events","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3337","id":110179223,"number":3337,"title":"Array support for property transformer when using $multiple = true","user":{"login":"mihai-stancu","id":1294142,"avatar_url":"https://avatars.githubusercontent.com/u/1294142?v=3","gravatar_id":"","url":"https://api.github.com/users/mihai-stancu","html_url":"https://github.com/mihai-stancu","followers_url":"https://api.github.com/users/mihai-stancu/followers","following_url":"https://api.github.com/users/mihai-stancu/following{/other_user}","gists_url":"https://api.github.com/users/mihai-stancu/gists{/gist_id}","starred_url":"https://api.github.com/users/mihai-stancu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihai-stancu/subscriptions","organizations_url":"https://api.github.com/users/mihai-stancu/orgs","repos_url":"https://api.github.com/users/mihai-stancu/repos","events_url":"https://api.github.com/users/mihai-stancu/events{/privacy}","received_events_url":"https://api.github.com/users/mihai-stancu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-10-07T08:53:40Z","updated_at":"2015-10-26T14:41:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/pulls/3337","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3337","diff_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3337.diff","patch_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3337.patch"},"body":"When using `OneToMany` collections in a form field with `'multiple' => true` the `ModelToIdPropertyTransformer` expects an `ArrayCollection` and throws an exception if the supplied value is an `array`.\r\n\r\nExample: A `User` entity which implements the `UserInterface` has to return an `array` for `getRoles` even though the property `roles` (might be /) is an `ArrayCollection`; hence the getter will return `$this->roles->toArray()`.\r\n\r\n- Check if $entityOrCollection is array\r\n- Add test case for transforming an array\r\n"},"comment":{"url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/comments/151160051","html_url":"https://github.com/sonata-project/SonataAdminBundle/pull/3337#issuecomment-151160051","issue_url":"https://api.github.com/repos/sonata-project/SonataAdminBundle/issues/3337","id":151160051,"user":{"login":"mihai-stancu","id":1294142,"avatar_url":"https://avatars.githubusercontent.com/u/1294142?v=3","gravatar_id":"","url":"https://api.github.com/users/mihai-stancu","html_url":"https://github.com/mihai-stancu","followers_url":"https://api.github.com/users/mihai-stancu/followers","following_url":"https://api.github.com/users/mihai-stancu/following{/other_user}","gists_url":"https://api.github.com/users/mihai-stancu/gists{/gist_id}","starred_url":"https://api.github.com/users/mihai-stancu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihai-stancu/subscriptions","organizations_url":"https://api.github.com/users/mihai-stancu/orgs","repos_url":"https://api.github.com/users/mihai-stancu/repos","events_url":"https://api.github.com/users/mihai-stancu/events{/privacy}","received_events_url":"https://api.github.com/users/mihai-stancu/received_events","type":"User","site_admin":false},"created_at":"2015-10-26T14:41:56Z","updated_at":"2015-10-26T14:41:56Z","body":"Bump"}}