Given an Single Table Inheritance for Location -> A and Location -> B
* @DiscriminatorMap({
* "a" = "A",
* "b" = "B"
* })
* @Discriminator(field = "discr", map = {
* "a" = "A",
* "b" = "B",
* })
abstract class Location
In the Controller, i will send either an A or B type extending Location.
/**
* @Rest\Post("", name="create_l")
* @ParamConverter("location", converter="fos_rest.request_body")
*/
public function insert(Location $location): JsonResponse
Doctrine tells me the obvious message it cant instaniiate an abstract class, which is true but it should instead create the subtype.
If A comes in, it should be converted to A, not instantiiate Location.
Any solutions?