1. Create complex type Sub1 with property P1:int
2. Create complex type Sub2 with property P2:int
3. Create complex type Comp with properties S1:Sub1, S2:Sub2
4. Create class Class1 with primary key and properties C1:Comp, C2:Comp
This generates the following wrong MSL (see how S2 is nested in S1):
Code: Select all
<!-- MSL content -->
<edmx:Mappings>
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
<EntityContainerMapping StorageEntityContainer="EntitiesStoreContainer" CdmEntityContainer="Entities">
<EntitySetMapping Name="Class1s">
<EntityTypeMapping TypeName="Model.Class1">
<MappingFragment StoreEntitySet="Class1s">
<ScalarProperty Name="Id" ColumnName="Id" />
<ComplexProperty Name="C1" TypeName="Model.Comp">
<ComplexProperty Name="S1" TypeName="Model.Sub1">
<ScalarProperty Name="P1" ColumnName="P1" />
<ComplexProperty Name="S2" TypeName="Model.Sub2">
<ScalarProperty Name="P2" ColumnName="P2" />
</ComplexProperty>
</ComplexProperty>
<ComplexProperty Name="S2" TypeName="Model.Sub2">
<ScalarProperty Name="P2" ColumnName="P22" />
</ComplexProperty>
</ComplexProperty>
<ComplexProperty Name="C2" TypeName="Model.Comp">
<ComplexProperty Name="S1" TypeName="Model.Sub1">
<ScalarProperty Name="P1" ColumnName="P11" />
<ComplexProperty Name="S2" TypeName="Model.Sub2">
<ScalarProperty Name="P2" ColumnName="P21" />
</ComplexProperty>
</ComplexProperty>
<ComplexProperty Name="S2" TypeName="Model.Sub2">
<ScalarProperty Name="P2" ColumnName="P23" />
</ComplexProperty>
</ComplexProperty>
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
</EntityContainerMapping>
</Mapping>
</edmx:Mappings>
</edmx:Runtime>
Is this a known error or nesting complex properties is not supported by EntityDeveloper?