Book a Demo

Author Topic: multiple associations between two classes in DDL  (Read 3372 times)

emquad

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
multiple associations between two classes in DDL
« on: January 04, 2006, 01:41:42 am »
It is sometimes necessary to have more than one connector from one class to another.

Lets assume there is an entity "A" which has associated up to 3 objects of entity "B" which have different roles.
You can model this by specifying an association between A and B for each role and give them a different rolename.
If you transform this to DDL, there will be a foreignkey for each association, but they all have the same parameters (name, relating columns) and do not follow the rolename.

What I'm thinking of is to name the FK as the rolename which allows different FKs to the same table.

I tried to do this using an addin, but I failed when it comes to DDL code generation, because the DDL codegeneration assumes that the FK name is equal to the PK name.


Thanks
Martin