I have the following classes
/**
* @Discriminator(field = "type", map = {
* "b":"B",
"c":"C",
* })
*/
abstract class A {}
class B extends A { ... }
class C extends A {
/**
* @var A
* @Serializer\Type("A")
*/
$a
}
now when I serialize an object of class C
:
The discriminator field name "type" for base-class "A" was not found in input data.
Any idea what am I doing wrong here? I am using JMS serializer.
EDIT
I am getting this exception when I try to deserialize the serialized object.