Forum Stats

  • 3,838,691 Users
  • 2,262,394 Discussions


Forward Engineer LDM to Relational Model Foreign Key Column Table Prefix Unwanted

Owen Singleton
Owen Singleton Member Posts: 2


I have a simple model which I'm using to learn this tool.  I have entities with 'Create Surrogate Key' ticked when I forward engineer to a relational model I get the surrogate key correctly formed as {Table Name}_ID but on the target table but it is in the form of {Table Name}_{Table Name}_ID.  Tearing my hair out on how to disable this behaviour so I just get an the original column name without a prefix.

I don't want to run a post script to modify the column name, I'd like the forward engineering to simply generate the foreign key column with the same name it has on the source table.

I'm using version



Best Answer


  • Saubhik
    Saubhik Member Posts: 5,805 Gold Crown
    edited Aug 20, 2020 1:28PM Answer ✓

    The thing you need to look is:

    1. Right Click on your Data model -->Design properties .


    2. When Generating Relational model then


  • Owen Singleton
    Owen Singleton Member Posts: 2
    edited Aug 21, 2020 4:36AM

    Thank you for your suggestion.  I looked closely at the templates pane under Design properties.  I found that there is an ability to set these properties and templates at a global level under Tools->Design Level Settings and also, optionally, at a specific model level if you right click on the top level model node under the Designs browser tree view control.

    I had looked at these settings previously but was somewhat confused by the heading 'Table Constraints'.  Most of the templates do indeed cover constraints but we also have "Column Foreign Key", "Surrogate Key Column" and "Discriminator Column"  which can indeed be used to set the construction of these column names.

    I did find that the Forward Engineer "Apply name translation" tick box had no effect on whether these templates were used or not.  I believe this parameter controls whether glossary words are used to replace entity / attribute names.

    Thanks again for your help!