Support Article
BadTableMappingException error on saving records
Summary
BadTableMappingException error occurs on saving records on the customerdata.data_table_name table. On exposing the RealTimeCustUpdateDate column on the customerdata.data_table_name table, an error occurs while saving records on the table.
Error Messages
com.pega.pegarules.pub.database.BadTableMappingException: Database-BadTableMapping-TooManyProperties
Steps to Reproduce
- Modify a schema to add a column to a data table (fully exposed - no BLOB)
- Deploy the change through a Product rule that includes the schema changes (which includes the update to the data table)
Root Cause
According to the error, the table mapping information used by the util node (which maps the properties to the columns in the database) was not updated after the column was added to the database. This map did not have an entry for the new property. Hence, the Too many properties error occurred in the data that was saved to the database.
However, the Class rule for the class that had a new property was not included in the Product rule which contained the schema change. Hence, the Class rule's data mapping was not updated internally.
Resolution
Perform the following local-change:
Save the Class rule manually to update the data map.
Published December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.