Skip to main content
July 25, 2023
Question

CDT Mappings

  • July 25, 2023
  • 2 replies
  • 0 views

Hi All, 

Recently when we are trying to resolve Health Check UI highlighted issues for our application we got one Yellow warning as "Array of primitive type detected"

There is one CDT

type!TEST_CDT(

id,

name,

documentId

)

<xsd:element maxOccurs="unbounded" minOccurs="0" name="documentId" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="document_id", nullable=false, columnDefinition="INT(11)")</xsd:appinfo>
</xsd:annotation>
</xsd:element>

This document is mapped as Number(Integer) and is Array, which is giving the above warning.

ISSUE: When I am checking the database the table does not have this column and still data store verification is being passed. Values are being stored in this variable and are being queried too. I am not able to understand how this column is not present in database and still mapped in CDT.

    2 replies

    stefanhelzle0001
    Brainy
    July 25, 2023

    This is automatically stored in a separate table as a relational DB cannot store multiple values in a single field.

    mathieud0001
    Brainy
    July 26, 2023

    The warning is saying that you have an array of a primitive type (integer, text etc.).

    To remove the warning, you have 2 options:

    • Remove the array and concatenate the values together in a text field with a delimiter.
    • Your other option is to create a proper CDT to store the multiples with a foreign key to your primary table. i.e.: TEST_DOCUMENT(ID, testCdtID, documentId)