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

Unable to avoid inserting null values in column during Obj-Save

SA-56393

Summary



Performing Obj-Save, inserts null values in column with the below format:
'Column_name'  Data_Type NOT NULL GENERATED ALWAYS AS ROW BEGIN

The requirement is to avoid inserting null values in the column.



Error Messages



[MSG][obj-save failed.][STACK][com.pega.pegarules.pub.database.BadTableMappingException: Database-General trying to store an empty property SystemStartDate to a database column that does not accept nulls From: (H5FDF9595F0DDD7927E433A836A4173A8:127.0.0.1) at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.setStmtInsert(PageDatabaseMapperImpl.java:1873) at com.pega.pegarules.data.internal.access.PageDatabaseMapperImpl.fillInStatementFromPageWithStream(PageDatabaseMapperImpl.java:1413) at com.pega.pegarules.data.internal.access.Saver.getStatementWithPrepValues(Saver.java:1608) at com.pega.pegarules.data.internal.access.Saver.updateInstance(Saver.java:1167) at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:927) at com.pega.pegarules.data.internal.access.Saver.saveInstance(Saver.java:803) at
........
com.pega.pegarules.data.internal.access.Saver.save(Saver.java:682) at com.pega.pegarules.data.internal.access.Saver.save(Saver.java:1899) at com.pega.pegarules.data.internal.access.DatabaseImpl.save(DatabaseImpl.java:2704) at com.pegarules.generated.activity.sh_action_testsystemdate_e8276fa2524d00ad9fae77b6244fc555.step3_circum0(sh_action_testsystemdate_e8276fa2524d00ad9fae77b6244fc555.java:245) at com.pegarules.generated.activity.sh_action_testsystemdate_e8276fa2524d00ad9fae77b6244fc555.perform(sh_action_testsystemdate_e8276fa2524d00ad9fae77b6244fc555.java:88) at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3559) at



Steps to Reproduce

  1. Log in to the application
  2. Perform Obj-Save of a table with generated not null column


Root Cause



A defect in Pegasystems’ code or rules.


Resolution

Here’s the explanation for the reported behavior: 

Pega does not support the combination of 'not null' and generated in the schema.
 


 

Published August 29, 2018 - 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