Question
Vodafone GmBH
IN
Last activity: 28 Aug 2015 11:21 EDT
key mismatch
Our application has a class XXX-Int-DWH-Assigned_Product which is mapped to a table Assgined_Product in db. This table was existing for few months. To update the entries in this table we recently added a primary key constraint in the database table also defined same property as the key in class definition. It works fine in DEV environment but not in test environment.
I can see the db table definition has a primary key in db and class also has keys, but while doing 'Test Connectivity' I get an error like below. I suspected a miss in grants or synonm but I dont see any differences in it
There is a key mismatch: the keys defined for class BGC-Int-DWH-AssignedProduct do not match the primary key columns for external data table Assigned_Product in database PegaRULES; the class keys are [Product_Sr_Number], but the table's primary keys are [].
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
- does the class has instances created already in test environment?
- have you tried re-saving the class & Data-Admin-DB-Table rule forms?
Vodafone GmBH
IN
1. The class instance was already present in test environment
2. I did resave the class and Data-Admin-DB-Table instance
Pegasystems Inc.
IN
the error is expected when instances already exist. need to delete the instances and then need to update the keys followed by re-saving class rule form and Data-Admin-DB-Table instance...
Pegasystems Inc.
US
Can you provide details of the primary key column definition on the database table?
Not sure what DB vendor/version, but there should be a way to confirm the table/key structure.
Vodafone GmBH
IN
The primary key is Product_Sr_Number number(20). There is a property by same name in the class. The property and the column were already existing, but we started them using as a primary key few days back.
@Phani -- We did not face this issue in DEV and ST environment. Only got in ITT environment.
Pegasystems Inc.
IN
>>> but we started them using as a primary key few days back.
- so there is no key defined on class rule form
- also no instances exist until this schema change?
could you please confirm?
Vodafone GmBH
IN
Initially the class did not have any keys but the property Product_Sr_No was present. Few days back we saved class with the key Product_Sr_No.
Instances were existing before schema change as well
Pegasystems Inc.
IN
>>> Instances were existing before schema change as well
the error is expected when instances already exist...
>>> We did not face this issue in DEV and ST environment
do instances exist before schema change?
Vodafone GmBH
IN
Hi Phani,
Pea behaviour is inconsistent in this case then. The instances did exist in DEV as well there we did not face any error. Even in ST we were facing error till yesterday, but after saving the class instance couple of times its working now. But there are few other classes for which its still not working.
Vodafone GmBH
IN
After saving the class instances, data admin db table instances and restarting server Pega is accepting new keys. however we did not test old pre-existing work objects.
-
Parmeet Singh Hora