Answer the question
In order to leave comments, you need to log in
In which table to store order attributes?
Build a many-to-many relationship. In the intermediate table I store id-заказа
and id-товара
. But where to store the attributes. The first thing that came to mind is here, in the intermediate table. The only problem is that pivot
I can only access this table through order_id
and product_id
. How to reach the rest of the fields with type attributes, color
etc.?
Or is my approach fundamentally wrong and a separate table is needed for attributes (then it will complicate everything, I don’t know how to organize it)?
I would be grateful for help.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question