﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
      
    
     
    <Schema Namespace="TestModel.Store" Alias="Self" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.1" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl">
        <EntityContainer Name="TestModelStoreContainer">
          <EntitySet Name="bug50698_1" EntityType="TestModel.Store.bug50698_1" store:Type="Tables" Schema="test" />
          <EntitySet Name="bug50698_2" EntityType="TestModel.Store.bug50698_2" store:Type="Tables" store:Schema="test" store:Name="bug50698_2">
            <DefiningQuery>SELECT
      `bug50698_2`.`foreign_id`
      FROM `bug50698_2` AS `bug50698_2`</DefiningQuery>
          </EntitySet>
          <EntitySet Name="main3" EntityType="TestModel.Store.main3" store:Type="Tables" Schema="test" />
          <EntitySet Name="property" EntityType="TestModel.Store.property" store:Type="Tables" Schema="test" />
          <EntitySet Name="tblquarantine" EntityType="TestModel.Store.tblquarantine" store:Type="Tables" Schema="test" />
          <EntitySet Name="countryproperties" EntityType="TestModel.Store.countryproperties" store:Type="Views" store:Schema="test" store:Name="countryproperties">
            <DefiningQuery>SELECT
      `countryproperties`.`Id`, 
      `countryproperties`.`Name`, 
      `countryproperties`.`Value`, 
      `countryproperties`.`ValueType`
      FROM `countryproperties` AS `countryproperties`</DefiningQuery>
          </EntitySet>
          <AssociationSet Name="fkey" Association="TestModel.Store.fkey">
            <End Role="bug50698_1" EntitySet="bug50698_1" />
            <End Role="bug50698_2" EntitySet="bug50698_2" />
          </AssociationSet>
        </EntityContainer>
        <EntityType Name="bug50698_1">
          <Key>
            <PropertyRef Name="id" />
          </Key>
          <Property Name="id" Type="uint" Nullable="false" StoreGeneratedPattern="Identity" />
        </EntityType>
        <!--Errors Found During Generation:
      warning 6002: The table/view 'test.bug50698_2' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
      -->
        <EntityType Name="bug50698_2">
          <Key>
            <PropertyRef Name="foreign_id" />
          </Key>
          <Property Name="foreign_id" Type="uint" Nullable="false" />
        </EntityType>
        <EntityType Name="main3">
          <Key>
            <PropertyRef Name="MAIN_ID" />
          </Key>
          <Property Name="MAIN_ID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="MAIN_NAME" Type="varchar" Nullable="false" MaxLength="45" />
        </EntityType>
        <EntityType Name="property">
          <Key>
            <PropertyRef Name="Id" />
          </Key>
          <Property Name="Id" Type="ubigint" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="Name" Type="text" Nullable="false" />
          <Property Name="Type" Type="varchar" Nullable="false" MaxLength="45" />
          <Property Name="Value" Type="text" Nullable="false" />
          <Property Name="ValueType" Type="varchar" Nullable="false" MaxLength="45" />
        </EntityType>
        <EntityType Name="tblquarantine">
          <Key>
            <PropertyRef Name="QuarID" />
          </Key>
          <Property Name="Deliver" Type="bool" />
          <Property Name="Expire" Type="bool" />
          <Property Name="MsgDate" Type="datetime" />
          <Property Name="MsgID" Type="int" />
          <Property Name="QuarID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="RejectID" Type="int" />
          <Property Name="ServerID" Type="int" />
        </EntityType>
        <!--Errors Found During Generation:
      warning 6002: The table/view 'test.countryproperties' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.
      -->
        <EntityType Name="countryproperties">
          <Key>
            <PropertyRef Name="Id" />
            <PropertyRef Name="Name" />
            <PropertyRef Name="Value" />
            <PropertyRef Name="ValueType" />
          </Key>
          <Property Name="Id" Type="ubigint" Nullable="false" />
          <Property Name="Name" Type="text" Nullable="false" />
          <Property Name="Value" Type="text" Nullable="false" />
          <Property Name="ValueType" Type="varchar" Nullable="false" MaxLength="45" />
        </EntityType>
        <Association Name="fkey">
          <End Role="bug50698_1" Type="TestModel.Store.bug50698_1" Multiplicity="1">
            <OnDelete Action="Cascade" />
          </End>
          <End Role="bug50698_2" Type="TestModel.Store.bug50698_2" Multiplicity="0..1" />
          <ReferentialConstraint>
            <Principal Role="bug50698_1">
              <PropertyRef Name="id" />
            </Principal>
            <Dependent Role="bug50698_2">
              <PropertyRef Name="foreign_id" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="fill_main3" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="test" />
      </Schema></edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="TestModel" Alias="Self" xmlns="http://schemas.microsoft.com/ado/2006/04/edm">
        <EntityContainer Name="TestContext">
          <EntitySet Name="tblquarantine" EntityType="TestModel.tblquarantine" />
          <EntitySet Name="property" EntityType="TestModel.property" />
          <EntitySet Name="countryproperties" EntityType="TestModel.countryproperties" />
          <EntitySet Name="main3" EntityType="TestModel.main3" />
          <EntitySet Name="bug50698_1" EntityType="TestModel.bug50698_1" />
          <EntitySet Name="bug50698_2" EntityType="TestModel.bug50698_2" />
          <AssociationSet Name="fkey" Association="TestModel.fkey">
            <End Role="bug50698_1" EntitySet="bug50698_1" />
            <End Role="bug50698_2" EntitySet="bug50698_2" /></AssociationSet></EntityContainer>
        <EntityType Name="tblquarantine">
          <Key>
            <PropertyRef Name="QuarID" />
          </Key>
          <Property Name="QuarID" Type="Int32" Nullable="false" />
          <Property Name="MsgDate" Type="DateTime" />
          <Property Name="MsgID" Type="Int32" />
          <Property Name="RejectID" Type="Int32" />
          <Property Name="Deliver" Type="Boolean" />
          <Property Name="Expire" Type="Boolean" />
          <Property Name="ServerID" Type="Int32" />
        </EntityType>
        <EntityType Name="property">
          <Key>
            <PropertyRef Name="Id" /></Key>
          <Property Name="Id" Type="Decimal" Nullable="false" />
          <Property Name="Name" Type="String" Nullable="false" />
          <Property Name="Type" Type="String" Nullable="false" />
          <Property Name="Value" Type="String" Nullable="false" />
          <Property Name="ValueType" Type="String" Nullable="false" /></EntityType>
        <EntityType Name="countryproperties">
          <Key>
            <PropertyRef Name="Id" />
            <PropertyRef Name="Name" />
            <PropertyRef Name="Value" />
            <PropertyRef Name="ValueType" /></Key>
          <Property Name="Id" Type="Int64" Nullable="false" />
          <Property Name="Name" Type="String" Nullable="false" />
          <Property Name="Value" Type="String" Nullable="false" />
          <Property Name="ValueType" Type="String" Nullable="false" /></EntityType>
        <EntityType Name="main3">
          <Key>
            <PropertyRef Name="MAIN_ID" /></Key>
          <Property Name="MAIN_ID" Type="Int32" Nullable="false" />
          <Property Name="MAIN_NAME" Type="String" Nullable="false" /></EntityType>
        <EntityType Name="bug50698_1">
          <Key>
            <PropertyRef Name="id" /></Key>
          <Property Name="id" Type="Int64" Nullable="false" />
          <NavigationProperty Name="bug50698_2" Relationship="TestModel.fkey" FromRole="bug50698_1" ToRole="bug50698_2" /></EntityType>
        <EntityType Name="bug50698_2">
          <Key>
            <PropertyRef Name="foreign_id" /></Key>
          <Property Name="foreign_id" Type="Int64" Nullable="false" />
          <NavigationProperty Name="bug50698_1" Relationship="TestModel.fkey" FromRole="bug50698_2" ToRole="bug50698_1" /></EntityType>
        <Association Name="fkey">
          <End Type="TestModel.bug50698_1" Role="bug50698_1" Multiplicity="1" />
          <End Type="TestModel.bug50698_2" Role="bug50698_2" Multiplicity="0..1" />
          <ReferentialConstraint>
            <Principal Role="bug50698_1">
              <PropertyRef Name="id" /></Principal>
            <Dependent Role="bug50698_2">
              <PropertyRef Name="foreign_id" /></Dependent></ReferentialConstraint></Association></Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS">
        <EntityContainerMapping StorageEntityContainer="TestModelStoreContainer" CdmEntityContainer="TestContext">
        <EntitySetMapping Name="property">
            <EntityTypeMapping TypeName="IsTypeOf(TestModel.property)">
              <MappingFragment StoreEntitySet="property">
                <ScalarProperty Name="ValueType" ColumnName="ValueType" />
                <ScalarProperty Name="Value" ColumnName="Value" />
                <ScalarProperty Name="Type" ColumnName="Type" />
                <ScalarProperty Name="Name" ColumnName="Name" />
                <ScalarProperty Name="Id" ColumnName="Id" /></MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="countryproperties">
            <EntityTypeMapping TypeName="IsTypeOf(TestModel.countryproperties)">
              <MappingFragment StoreEntitySet="countryproperties">
                <ScalarProperty Name="ValueType" ColumnName="ValueType" />
                <ScalarProperty Name="Value" ColumnName="Value" />
                <ScalarProperty Name="Name" ColumnName="Name" />
                <ScalarProperty Name="Id" ColumnName="Id" /></MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="tblquarantine">
            <EntityTypeMapping TypeName="IsTypeOf(TestModel.tblquarantine)">
              <MappingFragment StoreEntitySet="tblquarantine">
                <ScalarProperty Name="ServerID" ColumnName="ServerID" />
                <ScalarProperty Name="RejectID" ColumnName="RejectID" />
                <ScalarProperty Name="QuarID" ColumnName="QuarID" />
                <ScalarProperty Name="MsgID" ColumnName="MsgID" />
                <ScalarProperty Name="MsgDate" ColumnName="MsgDate" />
                <ScalarProperty Name="Expire" ColumnName="Expire" />
                <ScalarProperty Name="Deliver" ColumnName="Deliver" /></MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="main3">
            <EntityTypeMapping TypeName="IsTypeOf(TestModel.main3)">
              <MappingFragment StoreEntitySet="main3">
                <ScalarProperty Name="MAIN_NAME" ColumnName="MAIN_NAME" />
                <ScalarProperty Name="MAIN_ID" ColumnName="MAIN_ID" /></MappingFragment></EntityTypeMapping>
            <EntityTypeMapping TypeName="TestModel.main3">
              <ModificationFunctionMapping>
                <InsertFunction FunctionName="TestModel.Store.fill_main3" /></ModificationFunctionMapping></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="bug50698_1">
            <EntityTypeMapping TypeName="IsTypeOf(TestModel.bug50698_1)">
              <MappingFragment StoreEntitySet="bug50698_1">
                <ScalarProperty Name="id" ColumnName="id" /></MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="bug50698_2">
            <EntityTypeMapping TypeName="IsTypeOf(TestModel.bug50698_2)">
              <MappingFragment StoreEntitySet="bug50698_2">
                <ScalarProperty Name="foreign_id" ColumnName="foreign_id" /></MappingFragment></EntityTypeMapping></EntitySetMapping>
          <AssociationSetMapping Name="fkey" TypeName="TestModel.fkey" StoreEntitySet="bug50698_2">
            <EndProperty Name="bug50698_2">
              <ScalarProperty Name="foreign_id" ColumnName="foreign_id" /></EndProperty>
            <EndProperty Name="bug50698_1">
              <ScalarProperty Name="id" ColumnName="foreign_id" /></EndProperty></AssociationSetMapping></EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <edmx:Designer xmlns="http://schemas.microsoft.com/ado/2007/06/edmx">
    <edmx:Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </edmx:Connection>
    <edmx:Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
      </DesignerInfoPropertySet>
    </edmx:Options>
    <!-- Diagram content (shape and connector positions) -->
    <edmx:Diagrams>
      <Diagram Name="TestModel">
        <EntityTypeShape EntityType="TestModel.tblquarantine" Width="1.5" PointX="2.75" PointY="0.75" Height="2.3648893229166665" IsExpanded="true" />
        <EntityTypeShape EntityType="TestModel.property" Width="1.5" PointX="6.375" PointY="2.25" Height="1.9802864583333335" />
        <EntityTypeShape EntityType="TestModel.countryproperties" Width="1.5" PointX="8.375" PointY="2.25" Height="1.7879850260416674" />
        <EntityTypeShape EntityType="TestModel.main3" Width="1.5" PointX="0.75" PointY="4.75" Height="1.4033821614583335" />
        <EntityTypeShape EntityType="TestModel.bug50698_1" Width="1.5" PointX="3.375" PointY="5.875" Height="1.4033821614583335" />
        <EntityTypeShape EntityType="TestModel.bug50698_2" Width="1.5" PointX="5.625" PointY="5.875" Height="1.4033821614583335" />
        <AssociationConnector Association="TestModel.fkey" >
          <ConnectorPoint PointX="4.875" PointY="6.5766910807291667" />
          <ConnectorPoint PointX="5.625" PointY="6.5766910807291667" /></AssociationConnector></Diagram></edmx:Diagrams>
  </edmx:Designer>
</edmx:Edmx>