Answer the question
In order to leave comments, you need to log in
Is it ok to make a table without a foreign key?
Hello. I'm trying to implement Many To Many Polymorphic Relations in an application . I came across the fact that, in theory, in a pivot table, one of the columns should have a foreign key to several tables. As far as I know, this is impossible. Actually a question from here, whether it is normal to do such relation without foreign keys?
Answer the question
In order to leave comments, you need to log in
I didn’t understand the question, in taggable_type we will have Post or Video, which will determine which entity the taggable_id belongs to
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question