We are using the 'Write to Data Store' smart process to write data into an Oracle DB v18c. The column 'ID' is a primary key and is auto-generated by the DB via a 'before insert' trigger that is calling a sequence. In the XSD file of the corresponding CDT we have the annotations @Id @GeneratedValue.
Writing data to the DB works fine. However, the ID value returned from the 'Write to Data Store' process is incorrect. Seems like a different sequence is used.
Any suggestions on how to solve this problem are highly appreciated. Thank you in advance!
we use Oracle as DB and this is an example of a CDT for the primary key field
<xsd:element name="ID_GENERIC_TABLE_NAME" nillable="true" type="xsd:int"> <xsd:annotation> <xsd:appinfo source="appian.jpa">@Id @Column(name="ID_GENERIC_TABLE_NAME", nullable=false, columnDefinition="NUMBER") @SequenceGenerator(name="SQ_GENERIC_TABLE_NAME", sequenceName="SQ_GENERIC_TABLE_NAME") @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SQ_GENERIC_TABLE_NAME") </xsd:appinfo> </xsd:annotation> </xsd:element>
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.