CA PLEX triple fails to create a foreign key between the entities.
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).
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.