Hi, I was wondering, if I want to create a reference between one table and multiple other tables. is this possible?
For example: Lets say I have an Uploads table and I want Users table to have uploads and Posts table to have uploads as well. Can this be done with exposed? I mean with the
referencedOn
and
referrersOn
functions
t
tapac
05/05/2020, 12:45 PM
What kind of relation do you want to setup?
Users -> many uploads
Posts -> many uploads ?
y
Yoavya
05/05/2020, 12:46 PM
yes
Yoavya
05/05/2020, 12:47 PM
but referencing by just ID is not enough since the two tables ids can collide, so I was thinking of adding a type column but I can’t reference by two columns just one
t
tapac
05/05/2020, 1:04 PM
Maybe it's worth to add UserToUploads and PostToUpload tables and link them with