Check constraints throwing errors on publish

Document ID : KB000007791
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

We are in the process of verifying an upgrade from 3.8 to 4.2 TDM GA.  A blocker has come to the surface regarding constraints. Previously, we were able to move from source to the target with NULLs or valid values.  Now we get an error.

Environment:
TDM 3.8 to 4.2 upgraded environment.
Cause:

We are trying to copy a row which has NULL value in column NamePrefixCode, in the table PTY_PARTY from source to target. The PTY_PARTY table has check constraint on column NamePrefixCode which will allow NULL or valid values from a reference table. While copying the data using portal 3.8 it works fine and NULL will be copied from source to target. In case of portal 4.2, the copy process is ignoring the NULL value and passing empty/spaces to target. Due to this, a SQL insert is failing and throws an error. The error is:

"Empty Sting N'' is a values by itself and it doesn’t mean NULL or not equivalent to NULL value."

From the Trace on the Database:

VALUES(@P0,@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12,@P13,@P14,@P15,@P16,@P17,@P18,@P19,@P20)                                                                                                                                                             ',1071028644,N'YYYLEGACY',N'',N'',N'',N'',N'P',N'',N'',NULL,N'',N'',N'',N'',N'',N'(noname)',N'(noname)',0,'2017-07-26 

Resolution:

This error was resolved with the patch TDMWeb-4.2.13.0.zip.  Please contact Support for a patch if you are experiencing this error and have an earlier 4.2 release.  Please contact Support to make sure this fix got into next GA release.  This should be included in a GA release after August 10, 2017.

Additional Information:

You can download the latest version of TDM by following the directions in this document: https://support.ca.com/us/knowledge-base-articles.TEC1903942.html.   

To contact support, go to https://www.ca.com/us/services-support/ca-support/contact-support.html.