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

Not able to save instance of class error

SA-5593

Summary



Importing of data instances fails with the error.

Error Messages



Cannot save instance of class {class-name}; it belongs to fully exposed table {table-name} in database {database-name}, but the instance has properties which do not correspond to columns: {extra-properties-list}

Steps to Reproduce



Create multiple properties with the same name but in different case, as an example MyID and myID.
This can be done by ignoring the warning generated when creating the 'duplicate' property.



Root Cause



The root cause of this problem is a defect in Pegasystems’ code/rules.
The query used to grab the mapping for the classes we're interested in is something like this:
select pyPropertyName from pr4_rule_property where pyClassName in ('PegaSample-Task', 'PegaSample', 'Work-', '@baseclass') and pyRuleAvailable != 'No'  
There is no ruleset filtering in here.  At this layer in the engine, classes are still really treated as "global."  
This case causes problems, if there are properties defined at different points in the class hierarchy with the same name but different case.  
If there is a property named MyID on PegaSample, and a property named MyId on Work-, then the query reads both of these definitions and attempt to insert both of them into the ColumnPropertyMap with a key of MYID.
The problem is that the definition which comes in second is the only one that remains in the map, and which definition ends up second is completely non-determinstic and depends on the result set order from the database.

There is validation when saving properties to prevent this situation, but it doesn't prevent conflicts when a RAP is imported.
 
This often manifests itself as a Database-BadTableMapping-TooManyProperties error.
 


Resolution



This issue is scheduled to addressed in future releases.
Delete or rename the duplicate property name.

Until this issue addressed, be consistent with property names as far as case is concerned.
 

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% 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