Support Article
Boolean variable picked up as smallint while packaging
SA-56887
Summary
When packaging a Product rule along with an associated class and instance, a PostgreSQL boolean column is exported as smallint. This causes the subsequent import to fail.
Error Messages
Save Failed: Database-General Cannot write property 'abc' to a decimal column -- it's value, "false", is not a decimal import
Steps to Reproduce
- Create a table and a column of type Boolean in the database.
- Insert some records in the table.
- Create a class in the application and associate it with the database table using the Data-Admin-DB-Table instance.
- Create a Product rule that includes this class and instance.
- Import the Product rule on a new instance
Root Cause
A software use or operation error.
A boolean type column is created for the PostgreSQL. As a result, the error occurs when the Data-Admin-DB-Table is packaged and imported.
Resolution
An enhancement request, FDBK-26226, is created for consideration by Pega Product Management.
Perform the following local-change to render boolean data type as represented by the Pega application:
Use 'character varying (5)' data type and the strings 'true' and 'false' to represent a boolean value.
Published July 23, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.