Map CDT value Decimal to a column in SQL

Hi,

I have Question on adding a new field with Number(decimal) as type in CDT by using XSD Uploading, i am in confuse situation where what will the following values for Decimal?? is it decimal or float or double in XSD file

</xsd:element>
<xsd:element name="Amount" nillable="true" type="xsd:double">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="AMOUNT", length=255)</xsd:appinfo>

If needed to Map the same field to Database SQL what will be AMOUNT column will be?? is it decimal or Double or Float or something else and also does length also be mentioned??

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer

    Hi , you need to use double or float to represent a decimal datatype in the XSD file. There are size and length constraints for float (4 bytes, 7 digits) and double (8 bytes, 15-16 digits). Length does not need to be mentioned in this case. The column in the database also needs to be of the same name and datatype.

    Here is how it should look like:

    <xsd:element name="remunerationAmount" nillable="true" type="xsd:double">
    <xsd:annotation>
    <xsd:appinfo source="appian.jpa">@Column(name="remunerationAmount", columnDefinition="DOUBLE")</xsd:appinfo>
    </xsd:annotation>
    </xsd:element>