Complex type errors [EntityDeveloper 5.5.87]

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
rcs
Posts: 1
Joined: Thu 25 Apr 2013 12:44

Complex type errors [EntityDeveloper 5.5.87]

Post by rcs » Thu 25 Apr 2013 13:22

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?

Shalex
Devart Team
Posts: 8033
Joined: Thu 14 Aug 2008 12:44

Re: Complex type errors [EntityDeveloper 5.5.87]

Post by Shalex » Mon 29 Apr 2013 16:16

Thank you for your report. We have reproduced the problem and will notify you when it is fixed.

Shalex
Devart Team
Posts: 8033
Joined: Thu 14 Aug 2008 12:44

Re: Complex type errors [EntityDeveloper 5.5.87]

Post by Shalex » Tue 30 Apr 2013 16:09

The bug is fixed. We will notify you when the corresponding build of Entity Developer is available for download.

Post Reply