{"action":"opened","issue":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/167","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/167/labels{/name}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/167/comments","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/167/events","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/issues/167","id":60268311,"number":167,"title":"Edit action: custom DBAL types are not \"automatically\" handled as before","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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-08T18:00:37Z","updated_at":"2015-03-08T18:00:37Z","closed_at":null,"body":"It seems that the custom DBAL types aren't handled as before, as described in the doc in this PR : https://github.com/javiereguiluz/EasyAdminBundle/pull/114/files\r\n\r\nI didn't take the time to investigate this issue at the moment, but as I ran into this several times on my test application since my previous developments, so I wanted to report it.\r\n\r\nPreviously, when a custom DBAL type was detected, the form type used to render it was named after the DBAL type itself. (**e.g**: DBAL `enum_type` => `enum_type` form type).\r\nNow, it seems the form type used instead is `text` and leads to the following classic **LogicException**:\r\n\r\n> The form's view data is expected to be of type scalar, array or an instance of \\ArrayAccess, but is an instance of class Acme\\AppBundle\\Model\\Enum\\MyEnum. You can avoid this error by setting the \"data_class\" option to \"Acme\\AppBundle\\Model\\Enum\\MyEnum\" or by adding a view transformer that transforms an instance of class Acme\\AppBundle\\Model\\Enum\\MyEnum to scalar, array or an instance of \\ArrayAccess.\r\n\r\n-----------  \r\n> :memo: The new action doesn't trigger the exception, as there is no data to map to the form (empty entity), as soon as the entity is not populated with data before. It simply renders a blank text input."}}