I have a CDT with field names having underscore in it (Eg. "first_name"). But when I am trying to create a table, the underscores are not coming in column names of database table. I need exactly the same names(with underscore). Is there any possible way to get it?
Discussion posts and replies are publicly visible
are you using xsd to create your cdt?
If not, use a xsd and configure your table column name there. An example would be :
<xsd:element name="first_name" nillable="true" type="xsd:string"> <xsd:annotation> <xsd:appinfo source="appian.jpa">@Column(length=255, name="first_name")</xsd:appinfo> </xsd:annotation> </xsd:element>
The highlighted part indicates the table column name.
Hi,
It is default, whenever we create tables directly from the CDT without editing the CDT xsd. It removes the underscore(_) and always in lower case column names.
If you want the exact same name then after creating the CDT, download the CDT xsd and edit it as Adtiya has suggested :
<xsd:element name="First_Name" nillable="true" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(Name="First_Name",length=10)</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Regards
Abhay