This project is read-only.

Return derived complex type

Topics: ASP.NET Web API
Jun 10, 2014 at 5:26 PM

I use web api 2.2-rc to build odata v4 service.
I'm trying to model entity type with property of complex type. Complex types are hierarchy of base abstract class and several concrete classes with extra properties defined. On entity type I have property of base class type, but each entity instance has concrete complex type instance.
In the model metadata I see both base abstract class and concrete classes as unrelated complex types (all properties of base class are duplicated in derived classes and there is no BaseType attribute as described here:
As a result, service returns only those properties of my concrete complex type that are defined in base class.
Is complex type inheritance supported or going to be supported? Are there any way to workaround the problem without modelling complex type as entity type?

Thank you,