Skip to Content
0
Oct 27 at 12:35 PM

Configuration using process env variable does not work for CDS_ENV_FEATURES_ASSERT_INTEGRITY

152 Views Last edit Oct 27 at 02:19 PM 2 rev

Hello CAP Team,

due to an issue in the Backend System data migration I have to deactivate the referential integrity check globally. According to @assert.integrity Constraint for to-one Associations this can be done with:

cds.env.features.assert_integrity = false

As this option should only take effect on a specific deployment in the SAP BTP Cloud Foundry I've defined a user provided variable in the BTP Cockpit of our App:

screenshot-2021-10-27-at-142900.png

when I ssh into the running app I can see that this value was correctly set:

vcap@b3904c23-24c4-48a0-4432-9caa:~$ env | grep CDS_
CDS_ENV_FEATURES_ASSERT_INTEGRITY=false

But when I now restart the data import I still see the ASSERT_REFERENCE_INTEGRITY errors in the log:

2021-10-27T13:59:32.86+0200 [APP/PROC/WEB/0] ERR     {
2021-10-27T13:59:32.86+0200 [APP/PROC/WEB/0] ERR       code: 'ASSERT_REFERENCE_INTEGRITY',
2021-10-27T13:59:32.86+0200 [APP/PROC/WEB/0] ERR       message: 'Reference integrity is violated for association "customer"',

I guess the underscore in the parameter name assert_integrity might be the issue. I'm now trying also with the Variable CDS_ENV_FEATURES_ASSERTINTEGRITY. I add a comment if that was sucessful.

CU
Gregor

Attachments