search cancel

How to change the FK placement for one-to-one optional relationships between two tables in Gen


Article ID: 226595


Updated On:




Have an entity relationship defined as one-to-one and optional on both ends of the relationship between entity A and entity B.  When the model is transformed/implemented, the process placed the FK (Foreign Key), RI Constraints, and FK Index on Table A, but wanted the FK and related objects on Table B.  How to change this?


Release : 8.6

Component : CA Gen Workstation Toolset


If the implementation of the one-to-one optional relationship between Entity A and Entity B has placed the FK (Foreign Key) and related objects on Table A and it is desired to have the FK on Table B,  perform the following steps: 

1.  From within the Gen Toolset for the model involved, go to the Data Structure List (DSL)

2.  On Table A, highlight the FK, the RI Constraint, the FK index & the columns within the FK index (if exists) and delete the selected group of objects from Table A.  

3.  Highlight Table A (at the table level) and from the DSL menu item, choose 'Edit' and 'Implement Relationship...'.  Implement this modified relationship again.  Now, the FK and its related objects will be on table B.