Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Foreign key constraint violation error with Obj-Save

SA-10465

Summary



When the application performs a save in a child table, it throws the referential integrity error. This error is thrown only in one environment. When the same is performed in another environment, there is no error generated. Oracle database is in use.

Error Messages



Fail: ORA-02291: integrity constraint (SCHEMA.ABC_MMM_AP_FK2) violated - parent key not found

Steps to Reproduce



1. Obj-save ( parent table )
2. Obj-save ( child table)
3. Commit to observe the changes.


Root Cause



In Pega 7.1.7, a new API that results in non-deterministic order of database SQL statement execution within a transaction in introduced.

In this case, the instance that is the target of the foreign key constraint must be inserted before the instance which has the primary key constraint. Due to the non-determinism behavior mentioned above, this is not always the case (even if the "save" operations are performed in the desired order).


Resolution



This issue is resolved through the following Local-change:

Add a prconfig setting using DSS or through prconfig.xml that reverts back to the original update mode.


    name
        database/batchUpdates
    with value as
    -1

Published June 12, 2015 - Updated October 8, 2020

Was this useful?

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us