Thank you for sharing your solution. As you say, there are multiple
ways of solving this kind of problem. Personally I prefer to model such
a relation with a third entity. Continuing your example, one invoice
would have multiple invoice lines. Each line has a one-to-many relation
with an inventory item. This invoice line would also contain all the
extra data you need such as quantity, dateAdded etc. The invoice line
table created in this situation actually takes the role of the
invoices_inventory table.

I like to keep data contained inside an entity. Relations are just
links between those entities.

Reply via email to