I have trawled through the odata.org spec for complex types and can't find anywhere where it says that Complex Types cannot refer to Entities, yet the ODataConventionModelBinder.MapComplexType errors if a Complex type refers to a collection of entities (see SRResources.ComplexTypeRefersToEntityType). The associated comment states that complex types cannot refer to entities, implying it is a deliberate design decision.
This is a huge (and unexpected) problem as it prevents actions returning a complex type that (for example) contains a collection of entities and some associated data - a very common scenario. For example, I have a regular synchronization method that returns a set of statistics and any changed entities.
Why is the restriction there at all?
This is a huge (and unexpected) problem as it prevents actions returning a complex type that (for example) contains a collection of entities and some associated data - a very common scenario. For example, I have a regular synchronization method that returns a set of statistics and any changed entities.
Why is the restriction there at all?