I have a DB2 datasource and while mapping Appian datastore entities to the


I have a DB2 datasource and while mapping Appian datastore entities to the existing DB2 tables I am getting this error:
"The data source schema does not match the type mappings: Wrong column type in DB2ADMIN.EMPTABLE for column EMP_NUMBER. Found: char, expected: nvarchar(255) (APNX-2-4056-000)"

In my CDT there is a field "EMP_NUMBER" of type "Text" which I am trying to map to a column "EMP_NUMBER" of type "nvarchar"
In Appian we have only "Text" for all string type fields.
Is there any solution to this problem? ...

OriginalPostID-125395

OriginalPostID-125395

  Discussion posts and replies are publicly visible

Parents
  • In order to make your data store to map correctly to your table you need to add the @Column(name="" columnDefinition="") annotation to specify the expected column name and type. For example



    <xsd:element name="EMP_NUMBER" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Column(name="EMP_NUMBER" columnDefinition="nvarchar(255)")
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
Reply
  • In order to make your data store to map correctly to your table you need to add the @Column(name="" columnDefinition="") annotation to specify the expected column name and type. For example



    <xsd:element name="EMP_NUMBER" type="xsd:string">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">
    @Column(name="EMP_NUMBER" columnDefinition="nvarchar(255)")
    </xsd:appinfo>
    </xsd:annotation>
    </xsd:element>
Children
No Data