opened
LaylaLiu
username_0
Model:
      
    <ComplexType Name="BaseComplexType" Abstract="true">
        <Property Name="AnyP" Type="Edm.String" />
      </ComplexType>
      <ComplexType Name="Address" BaseType="Service1.Models.BaseComplexType">
        <Property Name="Street" Type="Edm.String" />
      </ComplexType>
      <ComplexType Name="HomeAddress" BaseType="Service1.Models.Address">
        <Property Name="City" Type="Edm.String" />
      </ComplexType>
      <EntityType Name="Customer">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="CompanyAddress" Type="Service1.Models.Address" />
        <Property Name="HomeAddress" Type="Service1.Models.HomeAddress" />
      </EntityType>
      <Function Name="AbstractNonP" IsBound="true">
        <Parameter Name="bindingParameter" Type="Collection(Service1.Models.Customer)" />
        <ReturnType Type="Collection(Service1.Models.BaseComplexType)" />
      </Function>
      <EntityContainer Name="Container">
        <EntitySet Name="Customers" EntityType="Service1.Models.Customer" />
      </EntityContainer>

Then if the context url in actually reponse playload of function `AbstractNonP` is like `metadata#Collection(Service1.Models.Address)`. Client failes to materialize the payloads.

    {
		  "@odata.context":"http://localhost:13689/odata/$metadata#Collection(Service1.Models.Address)","value":[
		    {
		      "AnyP":null,"Street":"Zero Way"
		    },{
		      "AnyP":null,"Street":"One Way"
		    },{
		      "AnyP":null,"Street":"Two Way"
		    },{
		      "AnyP":null,"Street":"Three Way"
		    }
		  ]
		}
OData Client failes to materialize a collection of dervied complex type into a collection of base complex type.
issue
closed
LaylaLiu
username_0
issue
created
LaylaLiu
username_0
Fixed by commit 883f5a687bdabbf1d86f7c67c29359fa4bc82c3f
comment