How would I go about implementing a @MappedSuperclass on a CDT? The objective is to enable "inheritance" at the relational database level.
OriginalPostID-228460
Discussion posts and replies are publicly visible
Hi Philips, I hope this still helps ... someone, As Harshav said, you can see it is documented (Supported) docs.appian.com/.../Supported_XSD_Elements_and_JPA_Annotations.html Maybe the question is how to do it. In Java style, you would have 2 classes1) the "Parent" with the annotation @MappedSuperclass (no table exists for this class)2) the Child which extends this class The same needs to happen in XML.So, you can start generating the CDTs from scratch and later you download the XSD and "create a new version" with the following modifications 1) In the parent, you Annotate the CDT------------------------------Reference: https://docs.appian.com/suite/help/17.1/Supported_XSD_Elements_and_JPA_Annotations.html#supported-jpa-annotations ------------------------------<xsd:complexType name="APP_Parent"><xsd:annotation><xsd:appinfo source="appian.jpa">@MappedSuperclass</xsd:appinfo><xsd:documentation><![CDATA[Parent]]></xsd:documentation>...------------------ 2) In the Child, you have to extend the parent ------------------------------Reference: https://docs.appian.com/suite/help/17.1/Supported_XSD_Elements_and_JPA_Annotations.html#supported-elements ------------------------------<xsd:schema ...><xsd:include schemaLocation="%7Burn:com:appian:types:app%7DAPP_Parent.xsd" /><xsd:complexType name="APP_Child"><xsd:annotation><xsd:documentation><![CDATA[Child]]></xsd:documentation></xsd:annotation><xsd:complexContent><xsd:extension base="tns:APP_Parent">....-------------------- Notes: 1- As you can notice the include statement is the reference for the parent but escaped"{urn:com:appian:types:app}APP_Parent.xsd"2- When import it as a new version you will get an info, it is OK, just informative. If anyone have question please ask Best RegardsJose Perez