CA PLEX triple fails to create a foreign key between the entities

Document ID : KB000121468
Last Modified Date : 22/11/2018
Show Technical Document Details
Issue:
CA PLEX triple fails to create a foreign key between the entities. 
Environment:
CA PLEX 7.2.1, Oracle 12
Cause:
when add the [optionality SYS] continuation triple to a [ENT refers to ENT] triple CA Plex fails to create a foreign key between the entities. The foreign key should always be created when an entity refers another entity. It should be nullable or not depending on its optionality. Is there any way to configure CA Plex to always create the foreign key? Example local model attached. Notice that the created table (PARENT_ENTITY.tbl) references REFERRED_ENTITY_A (mandatory), but does not reference REFERRED_ENTITY_B (optional).
Resolution:
By default the entity ‘Optionality SYS’ triple is ‘Mandatory’ and Plex generator generates the database schema with foreign key constraint, this is to not break database integrity considering foreign key, and user has to supply valid foreign key value. Making ‘Optionality SYS’ triple as ‘optional’ – this does not generate the foreign key constraint and therefore allows user to skip the foreign key value. Plex does not generate foreign key constraint only if entity’s ‘optionality SYS’ is ‘Optional’. So generating foreign key with both the options (Mandatory/Optional) – this would lead into database integrity check failure in Optional option case, and Plex will fail to insert data into DB in absence of foreign key.
Additional Information:
https://support.ca.com/cadocs/0/CA%20Plex%207%201-ENU/Bookshelf_Files/HTML/Plex--Tutorial%20for%20Windows%20Guide/index.htm?toc.htm?1529607.html