1.what will happen if dont define autopk=true on main element of data schema in ACC
2.what will happen if i define autopk=true on main element of data schema in ACC
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@DishaSharma , Primary key is mandatory in a schema. If you don't have any dedicated attribute for primary key, then you can define autopk="true" which will create an attribute @id with datatype as long and whenever a new data get inserted into this schema, @id will keeps on incrementing.
If you have a dedicated primary key in your schema, then you don't have to add autopk="true", instead you can create primary key using your attribute with below syntax
<key name="PrimaryKey" internal="true">
<keyfield xpath="@name"/>
</key>
@DishaSharma , Primary key is mandatory in a schema. If you don't have any dedicated attribute for primary key, then you can define autopk="true" which will create an attribute @id with datatype as long and whenever a new data get inserted into this schema, @id will keeps on incrementing.
If you have a dedicated primary key in your schema, then you don't have to add autopk="true", instead you can create primary key using your attribute with below syntax
<key name="PrimaryKey" internal="true">
<keyfield xpath="@name"/>
</key>