0

It might be duplicate question but I could not find one relevant to my situation.

I have two tables: Product and Options. Product table fields are id and name.

Some product A can be sold together with other products of the same table, e.g.: products B, C and L. Is it legal to create Options table that has two FKs referring to one PK in Products? Django is frowning upon this saying: foreign key clash.

Options table in this case would look like: Id, MajorProduct fk Product_id, OptionalProduct fk Product_id.

Any other suggestions would be highly appreciated. Thank you.

unixbek
  • 135
  • 1
  • 7
  • This is exactly what I wanted to do! Thanks Shadow. It seems like Django is limiting me here. – unixbek Sep 01 '16 at 10:34
  • Consider upvoting the question and / or the answer in the duplicate topic if they were helpful. – Shadow Sep 01 '16 at 10:41

0 Answers0