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

Column-property mapping issue: Cannot save instance of class X

SA-12790

Summary



There is XYZ-FW-EWFW-Data-ClaimInfo class that was mapped to database table, PEGADBO.EDWEB_ERROR_DESCRIPTION which is a fully exposed table. On running the flow, pyCommitError is received.

This behavior was working fine in PRPC 6.2 SP2 and occurred after upgrading to Pega 7.1.8. The COUNTRY property exists in Pega and PEGADBO.EDWEB_ERROR_DESCRIPTION table has COUNTRY as a column.

Error Messages



.pyCommitError:** Cannot save instance of class XYZ-FW-EWFW-Data-Claimlnfo; it belongs to fully exposed table PEGADBO.EDWEB_ERROR_DESCRIPTION in database PegaDATA, but the instance has properties which do not correspond to columns: COUNTRY

Steps to Reproduce



1. Create a class, XYZ-FW-EWFW-Data-ClaimInfo that is mapped to database table ABC that has COUNTRY as a column.
2. Create a property 'COUNTRY' of Class XYZ-FW-EWFW-Data-ClaimInfo.
3. Create a property 'Country' of Class XYZ-FW-.

4. Create or save a work object of XYZ-FW-EWFW-Data-ClaimInfo.

Root Cause



COUNTRY is a Property of Class XYZ-FW-EWFW-Data-ClaimInfo and Country is a Property of Class XYZ-FW- that is actually causing this issue because both Properties are in the same hierarchy. Pega 7 has mapped the 'COUNTRY' column to 'Country' Property instead of 'COUNTRY' Property. So the main issue here is that the property COUNTRY is not mapped to the correct column in the table.

Property Column mappings are accomplished in the database layer of the product using a Java class called the ColumnPropertyMap. During ColumnPropertyMap calculation for class, all of the Rule-Obj-Property Rules defined on that class and all of its ancestors are read, and for each Property, a mapping from the name of the column (the Property name in all upper case) is added to the name of the property (in mixed case).

​There is a known scenario with this design - if there are properties defined at different points in the class hierarchy with the same name but different case, the definition which comes in second will be the only one that remains in the map and the definition which ends up second is completely non-deterministic.


Resolution



Apply the below local-change:

Map the Property to its column in the external mapping of the class XYZ-FW-EWFW-Data-ClaimInfo. 

This issue is scheduled to be addressed in a future Pega release. Until then, in such use cases, map the affected Property externally with column in Class Rule form.

Published August 14, 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