OneData 10.7 | Managing Master Data with webMethods OneData | Implementing webMethods OneData | Managing Object Constraints | Configuring Primary Key Constraints
 
Configuring Primary Key Constraints
Primary key constraints can be based on a single or concatenated from multiple columns. For information about creating an object, see Creating A Data Object. If there is an existing primary key, you can assign a new one by first deleting the existing key and then adding a new constraint.
Note:OneData does not recommend changing existing primary keys in an object.
If you are using SQL Server, when you change the primary key constraint of an object in the database, you must perform the Synchronize > Audit Trigger and Synchronize > Structure. The audit trigger in SQL Server depends on the primary key constraint.
Important:
Before deleting and then adding a new constraint, you must check if there are any workflows or time-bound transactions associated with the object.
*To configure primary key constraint
1. On the Menu toolbar, click Define > Objects and select the object in which you want to configure the primary key.
2. Select the Structure tab.
3. Click Edit Constraints.
You can see the constraint details in Primary Key Constraint grid. Click the Edit icon to view the column details.)
4. Click the Delete icon to drop the existing primary key.
5. Click Add new Primary key constraint and complete the fields.
You can create a multi-part primary key by selecting the required columns from the list of Available Columns.
6. Click Save.