Question
13
Replies
245
Views
Atos
Posted: October 28, 2019
Last activity: October 30, 2019
Closed
Class key property returning issue
Issue:
- Using the “create datatype” functionality, I have created the class: “Data-XXX”.
- Data-XXX contains properties .X, .Y and .Z.
- Where .Y was set as key.
- The requirements changed and .Y could have the same value twice.
- Thus, on the “Data-XXX”-rule settings I selected the automatic generation of the key, using .pyGUID.
However, PEGA 8.1.5 still requires .Y to be unique.
- So, I have deleted all datapages, report def, properties and the class-rule of Data-XXX.
- Now, I have created the datatype again, with the same name “Data-XXX” and properties.
- The issue returns, .Y is required and has to be unique.
After checking the DB schema, using the “modify schema” functionality, it appears .Y column could be the issue.
Which tools are best to be used in adjusting the column properties in the DB schema?
You can change keys on your Data-XXX class record:
But it's only possible if the class does not have any instances. So you need firstly remove all instances of the class (check in corresponded data table).
If you need these records for the future, copy them to temp data table.
Then - change the key in the class rule record and resave corresponding data table record (in Pega).
Now you will be able to save instances using different key.
If you'll need more clarification, ask me.