cancel
Showing results for 
Search instead for 
Did you mean: 

@assert.target on CodeList

Rwitte
Participant

Dear experts,

I just want to double-check if my understanding regarding the topic of using @assert.target in combination with CodeLists on SAP HANA is correct.
In the capire documentation it is stated the following

As a result if you now model something like this

using {
    Country,
    managed,
    cuid
} from '@sap/cds/common';

namespace com.example;


entity Example : managed, cuid {
    country : Country @assert.target;
}

build it and deploy it to HANA it will fail as due to the nature of a CodeList the assertion target (Country) will have JOINs.

Now my question would be if I understood this correct when I face this issue and what would be the proposed workaround to assure in such a case that no invalid country codes are entered.

Best regards,
Raphael

Accepted Solutions (0)

Answers (1)

Answers (1)

Rwitte
Participant
0 Kudos

Any guidance here mby from the CAP team how this topic should be tackled?