Commit failure for fully exposed data class issue
After additional properties were added to a class that is mapped to a fully exposed external database table, an error occurred on execution.
Cannot save an instance of a class [AAA-FW-......Data-MyClass] it belongs to fully exposed table MySchema.My_Table in database PegaDATA, but the instance has properties which do not correspond to columns, Prop1, Prop2
Steps to Reproduce
- Attempt to save an instance of a class, that is mapped to a fully exposed external database table.
- Ensure that external database table must have more properties than there are columns in the associated database table.
An issue in the custom application code or rules where properties that did not align with columns in the fully exposed external database table were present on the clipboard when instances are saved.
Here’s the explanation for the reported behavior: This behavior is expected. When an instance of a class is saved, all of the properties in that instance are saved to the associated database table. If the table is fully exposed, all of the properties being saved must have a column to be saved into. To avoid this behavior, the following options are available:
- Utilize an internal, Pega generated, table such as the table that is created when the class was created. Internal tables can leverage the pzPVStream property (also known as the BLOB) to save non-exposed properties. External tables cannot leverage the pzPVStream property, and must be fully exposed.
- Add columns to the external table that line up with the additional properties.
- Remove the additional properties from the clipboard before saving back to the database.
Published February 12, 2016 - Updated October 8, 2020
Was this useful?
60% found this useful
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.