Page 1 of 1

Complex type errors [EntityDeveloper 5.5.87]

Posted: Thu 25 Apr 2013 13:22
by rcs
We have tried the following.
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>
Manual fixing this error leads to next validation and code generation errors.
Is this a known error or nesting complex properties is not supported by EntityDeveloper?

Re: Complex type errors [EntityDeveloper 5.5.87]

Posted: Mon 29 Apr 2013 16:16
by Shalex
Thank you for your report. We have reproduced the problem and will notify you when it is fixed.

Re: Complex type errors [EntityDeveloper 5.5.87]

Posted: Tue 30 Apr 2013 16:09
by Shalex
The bug is fixed. We will notify you when the corresponding build of Entity Developer is available for download.