Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3895

OData - metadata returns primary key with attribute "Nullable=true"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.13, 8.12.4
    • 8.12.3
    • OData
    • None

      If column's name in source (PHYSICAL) model has different name than one in the source (case sensitive) then attribute "Nullable" is set to true.

      <vdb name="test" version="1">
          <model name="Source" type="PHYSICAL">
              <source name="rs" connection-jndi-name="java:/Redshift" translator-name="postgresql"/>
              <metadata type="DDL">
                  <![CDATA[create foreign table SmallB (
                      IntKey integer PRIMARY KEY OPTIONS(NAMEINSOURCE 'intkey', NATIVE_TYPE 'int4')) OPTIONS(NAMEINSOURCE 'smalla');
                  ]]>
              </metadata>
          </model>
      </vdb>
      

      result:

      <edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" Version="1.0">
        <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:DataServiceVersion="2.0">
          <Schema xmlns="http://schemas.microsoft.com/ado/2008/09/edm" Namespace="Source">
            <EntityType Name="SmallB">
              <Key>
                <PropertyRef Name="IntKey"/>
              </Key>
              <Property Name="IntKey" Type="Edm.Int32" Nullable="true"/>
            </EntityType>
            <EntityContainer Name="Source" m:IsDefaultEntityContainer="false">
              <EntitySet Name="SmallB" EntityType="Source.SmallB"/>
            </EntityContainer>
          </Schema>
      ...
      

              jdurani Juraj Duráni (Inactive)
              jdurani Juraj Duráni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: