Question


JPMC
US
Last activity: 9 Sep 2016 9:06 EDT
Did something changed about Obj-Save in 7.1.9?
HI All - Recently we upgraded our system from 7.1.5 to 7.1.9 and we faced a really weird problem with Obj-Save. We have already existing activity which was performing Obj-Save for a page and Class of this page is mapped to an dedicated physical table(this table does not have primary key). Its actually stores comments entered by users on the cases. up until now everything seems working fine and Obj-Save used to insert an additional row in the table whenever users try to add new comment in the case, but after upgrading to 7.1.9 it seems same Obj-save step is overwriting all pervious case comments by the latest comment whenever user try to add new comment on the case.
Why I suspect it is problem with Obj-Save is that the problem was resolved by replacing Obj-Save by RDB-Save. There was no other change made except this. I dont know why Obj-save behaves differently in this particular scenario, but again if there is no change in Obj-Save behavior then why it was working up until now in 7.1.5.
Did someone face this issue?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Pegasystems
IN
Please define a primary key and you should be all set.


Pegasystems Inc.
IN
- could we double check the key value? <CLASSNAME> <CLASSKEY>


JPMC
US
Thank you Phani Sahukaru for your response!! I updated my post to say that my table does NOT have primary key. I did check the class key. The property specified on the class rule as key is a single value property and we do have index on that column in physical table but my table doesn't have any primary key defined yet. there was no change on class rule level or table level before and after upgrade.


Infosys
AU
Did you trace with DB Query option enabled tracer, so that looking at actual query during Obj-Save and RDB-Save might give some idea?
Murali...


JPMC
US
Hi Murali Kakarla - Sorry for late response! I did get chance to trace DB query today and it seems instead of update table query it is forming merge table query when we use Obj-Save. Any idea when it happens? I never observed this kind of behavior before in pega.
MERGE INTO My_Schema.MY_CASE_CMNT t USING (SELECT ? "CO_KEY" , ? "CASE_ID" , ? "CMNT_TX" , ? "CO_MBR_ENT_ID" , ? "CRE_DT" , ? "TYPE_CD" , ? "OPER_ID" , ? "SUB_ID" , ? "TXN_DIV_MBR_ID" FROM dual) inputs ON (t.CO_KEY = inputs."CO_KEY") WHEN MATCHED THEN UPDATE SET CASE_ID = inputs."CASE_ID" , CMNT_TX = inputs."CMNT_TX" , CO_MBR_ENT_ID = inputs."CO_MBR_ENT_ID" , CRE_DT = inputs."CRE_DT" , TYPE_CD = inputs."TYPE_CD" , OPER_ID = inputs."OPER_ID" , SUB_ID = inputs."SUB_ID" , TXN_DIV_MBR_ID = inputs."TXN_DIV_MBR_ID" WHEN NOT MATCHED THEN INSERT (CO_KEY , CASE_ID , CMNT_TX , CO_MBR_ENT_ID , CRE_DT , TYPE_CD , OPER_ID , SUB_ID , TXN_DIV_MBR_ID) VALUES (inputs."CO_KEY" , inputs."CASE_ID" , inputs."CMNT_TX" , inputs."CO_MBR_ENT_ID" , inputs."CRE_DT" , inputs."TYPE_CD" , inputs."OPER_ID" , inputs."SUB_ID" , inputs."TXN_DIV_MBR_ID")


Infosys
AU
What is the value that is being passed in CO_KEY property? Could you attach a screenshot of General tab of class mapped to MY_CASE_CMNT table?
MERGE condition is checking on CO_KEY for matches but the update statement does not have any filters (where clause).
Murali...


JPMC
US
Thank you Murali!!- But that doesn't matter as neither class definition nor underlying table(MY_CASE_CMNT) definition has been changed from last 1 year. I am wondering how it was working fine up until now in 7.1.5 before upgrade to 7.1.9.
As requested information the Class definition has keys defined as CO_KEY only though we don't have any primary key defined on the physical table.


Infosys
AU
Pega GCS will be right team to answer if anything related to Obj-Save has changed from 7.1.5 to 7.1.9
To me, merge statement does not look correct, this might be due to the reason that you have CO_KEY as the key in the class definition but the mapped table does not have a primary key. May be a bug in 7.1.5 has been rectified in 7.1.9
Murali...


JPMC
US
Hi Murali Kakarla Thank you for your response! Can you please refer this post to someone from GCS or someone from GCS please confirm on the same?


Infosys
AU
Hi Dhirendra, I am not sure who would be best contact person from GCS for this. May be Lochana DurgadaVijayakumar or Marissa Rogers could help you.
Murali...


Hi Murali and Dhirendra,
Let me reach out to a few SMEs on this!
Regards,
Lochan | Online Community Moderator | Pegasystems Inc.
Updated: 15 Jun 2016 4:38 EDT


Pegasystems
IN
EPIC-4916 <Pega internal reference number> epic introduced Merge in 7.1.7. Test connection should catch the absence of a primary key. Didn’t it?


Hi Dhirendra,
Here's a related discussion that might shed some light!
OBJ-SAVE in PRPC 6 and Pega 7 versions
Regards,
Lochan


JPMC
US
Thank you Lochana DurgadaVijayakumar and Srikanth Challapilla for providing additional information on the same. So it seems something did change the way Obj-Save in v7.1.7.
From Query generated by Obj-Save captured from tracer in 7.1.9, it seems it will insert row only if no matching row is found for given key(defined on class rule form). Can someone please confirm the actual underlying working of Obj-Save or refer me any document related to same. and how do we make sure that obj-save insert row and not overwrite existing rows for given key (defined on class rule form).


Pegasystems
IN
Primary key for the class key columns will ensure that.


JPMC
US
Thank you for your response Srikanth Challapilla! It seems right now in 7.1.9 this is not the case. In my scenario Class key column has CO_Key property specified as a key column on class rule form but table does not have primary key and when we trigger obj-save it seems it is overwriting all existing rows for give CO_Key value.
Accepted Solution


Pegasystems
IN
Please define a primary key and you should be all set.


Ford Motor Company
US
We lost critical data due to this, and primary key was already defined. How do you say that is the solution?