EF Inheritance problems

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
Expecho
Posts: 1
Joined: Tue 23 Jul 2013 12:59

EF Inheritance problems

Post by Expecho » Tue 23 Jul 2013 14:56

Hi,

I have download the trail version of the Entityu Developer and tried to open our Entity Framework 5 model but it fails with the following error:

CSDL parsing failed: The attribute 'BaseType' of tag 'EntityType' has a unexpected value 'OrganizationEntity' at line #28670.
Warning! The error means that a part of the model cannot be read. If you save model after this, the unrecognized XML will be lost. It is strongly recommended to create a backup copy of the model to be able to restore it to the original state if needed.

This is a snippet of the content of the edmx. Visual Studio does not have any problems reading the file.

Code: Select all

<EntityType Name="OrganizationDepartment" BaseType="PlanCareModel.OrganizationEntity">
          <Property Type="Int64" Name="HeadEmployeeId" Nullable="false" />
          <Property Type="String" Name="DepartmentPhoneNumber" MaxLength="50" FixedLength="false" Unicode="false" Nullable="true" />
          <NavigationProperty Name="HeadEmployee" Relationship="PlanCareModel.REF_Organization_Department_Employee_Employee" FromRole="Organization_Department" ToRole="Employee" />
        </EntityType>
        <EntityType Name="OrganizationEntity" Abstract="true">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Type="Int64" Name="Id" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="OrganizationEntityTypeId" Nullable="false" />
          <Property Type="Int64" Name="PrimaryRelationAddress" />
          <Property Type="Int64" Name="FinancialCostHeadingId" Nullable="false" />
          <Property Type="String" Name="Name" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
          <NavigationProperty Name="CostHeading" Relationship="PlanCareModel.REF_Organization_Entity_Financial_CostHeading" FromRole="Organization_Entity" ToRole="CostHeading" />
          <NavigationProperty Name="OrganizationEntityType" Relationship="PlanCareModel.REF_Organization_Entity_Organization_Type" FromRole="Organization_Entity" ToRole="OrganizationEntityType" />
          <NavigationProperty Name="RelationAddress" Relationship="PlanCareModel.REF_Organization_Entity_Relation_Address" FromRole="Organization_Entity" ToRole="RelationAddress" />
          <NavigationProperty Name="OrganizationStructureHierarchies" Relationship="PlanCareModel.REF_Organization_StructureHierarchy_Organization_Entity" FromRole="OrganizationEntity" ToRole="Organization_StructureHierarchy" />
          <NavigationProperty Name="ParentOrganizationStructureHierarchies" Relationship="PlanCareModel.REF_Organization_StructureHierarchy_Organization_Entity_Parent" FromRole="OrganizationEntity" ToRole="Organization_StructureHierarchy" />
          <Property Type="Boolean" Name="IsCareDeliveryType" />
          <Property Type="Int32" Name="MigrationId" />
          <Property Type="Int32" Name="MigrationLevelId" />
          <NavigationProperty Name="CalendarPlanResources" Relationship="PlanCareModel.REF_Calendar_PlanResource_Organization_Entity" FromRole="OrganizationEntity" ToRole="CalendarPlanResource" />
          <NavigationProperty Name="Contracts" Relationship="PlanCareModel.REF_Contract_Contract_Organization_Entity" FromRole="OrganizationEntity" ToRole="Contract" />
          <NavigationProperty Name="ContractOfServices" Relationship="PlanCareModel.REF_Employee_ContractOfService_Organization_Entity" FromRole="OrganizationEntity" ToRole="ContractOfService" />
          <NavigationProperty Name="RegistrationStays" Relationship="PlanCareModel.REF_Registration_Stay_Organization_Entity" FromRole="OrganizationEntity" ToRole="RegistrationStay" />
          <Property Type="String" Name="Code" MaxLength="50" FixedLength="false" Unicode="false" />
          </EntityType>
Any suggestions on how to correct this?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: EF Inheritance problems

Post by Shalex » Thu 25 Jul 2013 17:04

Could you please send us a test *.edmx model so that we can reproduce the problem when opening it in Entity Developer?

Shalex
Site Admin
Posts: 8247
Joined: Thu 14 Aug 2008 12:44

Re: EF Inheritance problems

Post by Shalex » Wed 07 Aug 2013 12:04

The bug with parsing *.edmx is fixed. We will post here when the corresponding build of Entity Developer is available for download.

Post Reply