No error thrown at commit for primary key violation
Observing a strange behavior. Created a data type in Pega that has couple of columns and two columns as a combination for primary key. (UserID and DateTime)
When a record is saved to this table through an activity using Obj-Save and Commit having null values for both these primary keys- the activity is executed successfully and no error occurs during run time- Tracer is Clean. The same is observed when a duplicate record is saved (having same pzInsKey). Although this record is not added to the table, as expected.
What can be the reason for this behavior. Could this be due to creating the data type in an improper manner. I already deleted it once and recreated a new one. Still facing the same issue.
How did you verify that it is "null" and not "empty". One possible reason is that the value is empty. You can check that in tracer.
NULL is an absence of a value. An empty string is a value, but is just empty. NULL is special to a database.
NULL has no bounds, it can be used for string, integer, date, etc. fields in a database.
NULL isn't allocated any memory, the string with NULL value is just a pointer which is pointing to nowhere in memory. however, Empty IS allocated to a memory location, although the value stored in the memory is "".
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write Post button here. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.