Book a Demo

Author Topic: creating foreign keys in a single recursive table  (Read 3103 times)

dougwscott

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
creating foreign keys in a single recursive table
« on: September 08, 2012, 09:22:38 am »
How is the above done within EA's class modeler for tables (class with stereotype "table")?  The classic example: an Employee table with a PK of EmplNum and a column called ManagerEmplNum that contains the EmplNum value of the manager of the Employee. I have tried EA's "foreign key assignment" approach via the association, but without success.    

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: creating foreign keys in a single recursive ta
« Reply #1 on: September 10, 2012, 09:26:15 am »
I just tried it and it works for me. Here's what I did: Create a table, set its database, add two attributes of the same type, make one the primary key, add a reflexive association to the table, open the foreign keys dialog for the association, select the foreign key field at the source end and primary key field at the target end.

If you did all that without results, maybe send an e-mail to our support team telling them step-by-step exactly what you are doing and they should be able to spot the missing step.
The Sparx Team
[email protected]