How to make one object have 2 different relationships with another object.
I have 2 tables
So in short I have to have
My code follows the docs about relations but it does not work (my guess because of circular references).
These lines cause a TS error:
How do I correctly implement 2 different relations between 2 tables?
Product and Media. The product has a thumbnail and also images of the product. The thumbnail is one media and images are many media.So in short I have to have
one-to-one relation between Product.thumbnail and Media, and a one-to-many relation between Product.images and Media.My code follows the docs about relations but it does not work (my guess because of circular references).
These lines cause a TS error:
How do I correctly implement 2 different relations between 2 tables?