{"action":"created","issue":{"url":"https://api.github.com/repos/schmittjoh/JMSSerializerBundle/issues/292","labels_url":"https://api.github.com/repos/schmittjoh/JMSSerializerBundle/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/schmittjoh/JMSSerializerBundle/issues/292/comments","events_url":"https://api.github.com/repos/schmittjoh/JMSSerializerBundle/issues/292/events","html_url":"https://github.com/schmittjoh/JMSSerializerBundle/issues/292","id":13930866,"number":292,"title":"@Discriminator Error:   The error is:         The discriminator field name \"type\" for base-class \"MyBundle\\Entity\\MyClass\" was not found in     input data","user":{"login":"danieledangeli","id":3957293,"avatar_url":"https://avatars.githubusercontent.com/u/3957293?v=3","gravatar_id":"","url":"https://api.github.com/users/danieledangeli","html_url":"https://github.com/danieledangeli","followers_url":"https://api.github.com/users/danieledangeli/followers","following_url":"https://api.github.com/users/danieledangeli/following{/other_user}","gists_url":"https://api.github.com/users/danieledangeli/gists{/gist_id}","starred_url":"https://api.github.com/users/danieledangeli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieledangeli/subscriptions","organizations_url":"https://api.github.com/users/danieledangeli/orgs","repos_url":"https://api.github.com/users/danieledangeli/repos","events_url":"https://api.github.com/users/danieledangeli/events{/privacy}","received_events_url":"https://api.github.com/users/danieledangeli/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":33,"created_at":"2013-05-03T11:33:31Z","updated_at":"2015-06-24T15:07:38Z","closed_at":null,"body":"Hi, i have a problem with @discriminator for abstract class.\r\nFor example, this structure of classes don't work correctly when I try to serialize and deserialize the objects.\r\n\r\n```php\r\nclass Saloon\r\n{\r\n    /**\r\n     *@Type(\"integer\")\r\n     */\r\n    public $id;\r\n\r\n    /**\r\n     * @Type(\"MyME\\HelloBundle\\Controller\\Vehicle\")\r\n     */\r\n    public $veichle;\r\n}\r\n\r\n\r\n/**\r\n * @Discriminator(field = \"type\", map = {\"car\": \"MyME\\HelloBundle\\Controller\\Car\", * \"moped\":\"MyME\\HelloBundle\\Controller\\Moped\"})\r\n */\r\nabstract class Vehicle {\r\n\r\n    public $id;\r\n\r\n\r\n}\r\nclass Car extends Vehicle {\r\n\r\n    /**\r\n     *@Type(\"integer\")\r\n    */\r\n    public $id;\r\n    /**\r\n     *@Type(\"string\")\r\n     */\r\n    public $car_at;\r\n}\r\nclass Moped extends Vehicle {\r\n\r\n    /**\r\n     *@Type(\"integer\")\r\n     */\r\n    public $id;\r\n    /**\r\n     *@Type(\"string\")\r\n     */\r\n    public $moped_at;\r\n\r\n}\r\n```\r\n\r\nexample usage:\r\n\r\n\r\n```php\r\n        $car = new Car();\r\n        $car->id = 1; \r\n        $car->car_at = \"car\";\r\n      \r\n        $car2 = new Moped();\r\n        $car2->id = 2; \r\n        $car2->moped_at = \"moped\";\r\n   \r\n\r\n        $saloon = new Saloon();\r\n        $sal0on->veichle = $car2;\r\n        $serializer = SerializerBuilder::create()->build();\r\n        $jsonveic = $serializer->serialize($saloon,'json');\r\n\r\n        $saloon_des = $serializer->deserialize($jsonveic,'MyME\\HelloBundle\\Controller\\Saloon','json');\r\n```\r\nThe error is:\r\nThe discriminator field name \"type\" for base-class \"MyME\\HelloBundle\\Controller\\Vehicle\" was not found in     input data\r\n        \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/schmittjoh/JMSSerializerBundle/issues/comments/114901198","html_url":"https://github.com/schmittjoh/JMSSerializerBundle/issues/292#issuecomment-114901198","issue_url":"https://api.github.com/repos/schmittjoh/JMSSerializerBundle/issues/292","id":114901198,"user":{"login":"vdzpeter","id":13019814,"avatar_url":"https://avatars.githubusercontent.com/u/13019814?v=3","gravatar_id":"","url":"https://api.github.com/users/vdzpeter","html_url":"https://github.com/vdzpeter","followers_url":"https://api.github.com/users/vdzpeter/followers","following_url":"https://api.github.com/users/vdzpeter/following{/other_user}","gists_url":"https://api.github.com/users/vdzpeter/gists{/gist_id}","starred_url":"https://api.github.com/users/vdzpeter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdzpeter/subscriptions","organizations_url":"https://api.github.com/users/vdzpeter/orgs","repos_url":"https://api.github.com/users/vdzpeter/repos","events_url":"https://api.github.com/users/vdzpeter/events{/privacy}","received_events_url":"https://api.github.com/users/vdzpeter/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T15:07:38Z","updated_at":"2015-06-24T15:07:38Z","body":"The discr is listet in the content entry but it gets not deserialized \r\n <content>\r\n    <entry> \r\n        <show_counter_in_title>false</show_counter_in_title>\r\n        <discr><![CDATA[listmodule]]></discr>\r\n    </entry>\r\n </content>\r\n"}}