I have a requirement to create a schema with a custom primary key with auto-increment functionality.
I have created the below schema.
<element autopk="false" desc="Terms and Conditions Table" label="Terms And Conditions"
labelSingular="Terms And Conditions" name="terms_conditions" pkSequence="auto_custerms_conditions_sequence">
<attribute autoIncrement="true" label="Terms Key" name="terms_key" type="long"/>
<attribute label="Terms" name="terms" type="string"/>
<attribute label="Terms Start Date" name="terms_start_date" type="datetime"/>
<key internal="true" name="terms_key">
<keyfield xpath="@terms_key"/>
</key>
</element>
Note that I have specified autoIncrement="true" in terms_key attribute definition.
But after inserting records, the "terms_key" is not getting auto-incremented. Is defining schema with autopk=true and leveraging campaign generated id field is the only option?
Thanks
Bharath