Book a Demo

Author Topic: Two associations or one?  (Read 3168 times)

kgish

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
    • View Profile
Two associations or one?
« on: May 14, 2005, 12:28:54 pm »
Just wanted to know if there is a difference between defining two separate associations for two different fields in a table pointing to the same field in another table and defining a single association with the two fields listed in the source list?

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Two associations or one?
« Reply #1 on: May 14, 2005, 12:30:39 pm »
Hi,

I take it you have a table with two foreign keys pointing to the same primary key elsewhere, am I correct? In that case you need to draw two associations, one for each foreign key.

Bruno

kgish

  • EA User
  • **
  • Posts: 62
  • Karma: +0/-0
    • View Profile
Re: Two associations or one?
« Reply #2 on: May 14, 2005, 12:33:42 pm »
Okay that's pretty much what I expected. However, I see that it is possible to define two foreign keys in the source list for an association to a PK in another table.

What does that mean then?

(By the by Bruno, your speed in answering my questions is amazingly quick, chatting might even be better)

Bruno.Cossi

  • EA User
  • **
  • Posts: 803
  • Karma: +0/-0
    • View Profile
Re: Two associations or one?
« Reply #3 on: May 14, 2005, 02:01:03 pm »
Hm, I am not quite sure. By "defining two foreign keys in the source list for an association to a PK", do you mean manually entering them in the source role field? I will give it a try and see what the generated DDL looks like.

This actually has been almost like real-time chat :-) Feel free to contact me via e-mail (see my profile) should you need quick response!

Bruno

Quote
Okay that's pretty much what I expected. However, I see that it is possible to define two foreign keys in the source list for an association to a PK in another table.

What does that mean then?

(By the by Bruno, your speed in answering my questions is amazingly quick, chatting might even be better)