Foreign Key Naming by Association Name

Hi!
I choosing follow naming pattern (please, see attachment), but FK don’t get desired name. Why? Association have required name.
FK&FKRelationshipPatterns.jpg

Hi Eugeny,

Thanks for your post. After you synchronized from class diagram to ERD, please try to edit the name of relationship between entities and you should see the FK name being updated.

Hope this helps.

Best regards,
Lilian Wong

Thanks!

But FK Relationship Pattern “{association_name}” didn’t work…

Hi Eugeny,

Thanks for replying. I tested with simple project and the configuration of FK Relationship Pattern does work. Would you mind to send me your project file so I can take a look at your case? Thanks in advance!

Please send your project to lilian.wong@visual-paradigm.com

Best regards,
Lilian Wong

I sent my project on your e-mail. Thanks in advance for tests!

Hi Eugeny,

Thanks for the project file. You modeled inheritance in class diagram and configure inheritance strategy as Table per subclass so having relationships between entities when synchronize to ERD. However, FK Relationship Pattern does not take any effect on the relationships between entities which are generated by inheritance strategy.

Hope this resolves your doubt. If you have any further inquiry, please let me know.

Best regards,
Lilian Wong

Thanks!
Yes, this work for the association (non-inheritance).

Hi Eugeny,

It’s my pleasure.

Best regards,
Lilian Wong

When will this work for associations to an inheritance structure?

I have associations with my subclasses but they are not taken into account while generating the foreign key.
My inheritance strategy for ORM is 1 table for the superclass (hierarchie).

eg superclass code
id long
subclass disktype subclass screentype
^ ^
| |
class A class B

On my db i have 3 tables
table code
pk= code id
table A
fk=code_id
table B
fk=code_id

what i want is

On my db i have 3 tables
table code
pk= code id
table A
fk=disktype_id
table B
fk=screentype_id

How can i make sure that the FK get a special name (or name of the subclass, or name of the association to that subclass)
My Build 20100129.

thanks