After add new permitted value CA Gen runtime code executes "WHEN permitted value violation"
search cancel

After add new permitted value CA Gen runtime code executes "WHEN permitted value violation"

book

Article ID: 138999

calendar_today

Updated On:

Products

Gen Gen - Workstation Toolset Gen - Run Time Distributed

Issue/Introduction

In our code, we do a CREATE on a entity.  One attribute is set for 3 permitted values, <space>, S and N.  This is currently working correctly.

Now we want to add another permitted value (P) for that attribute.  On the Toolset we managed to get it right but after generating and when our users started to test it gave an error saying it violates the permitted values set for that attribute.  The code logic executes the "WHEN permitted value violation" section.


Environment

Release : 8.5

Component : CA Gen Workstation Toolset


Resolution

The Oracle DDL generated for the attribute is the following.


    <ATTRIBUTE_NAME> CHAR(1) NOT NULL

       CHECK (<ATTRIBUTE_NAME> IN ('P', 'S', 'N', ' ')),


Before the change to the permitted values in the model, the database has CHECK (<ATTRIBUTE_NAME> IN ('S', 'N', ' ')),.

After adding the permitted value in the model, the physical database needs to be updated for the new permitted value, CHECK (<ATTRIBUTE_NAME> IN ('P', 'S', 'N', ' ')),.