You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Sorry for asking. But I had this schema:
Order hasMany Shipment
Shipment many to many with Product with product_shipment pivot tables.
and now, I have ProductLot, which belongs to product_shipment id of the pivot table.
(I mean each lot belongs to the product_shipment table, hope you can understand what I'm trying to say.)
In the Order Model, I have this relationship which returns the Products
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Sorry for asking. But I had this schema:
Order hasMany Shipment
Shipment many to many with Product with product_shipment pivot tables.
and now, I have ProductLot, which belongs to product_shipment id of the pivot table.
(I mean each lot belongs to the product_shipment table, hope you can understand what I'm trying to say.)
In the Order Model, I have this relationship which returns the Products
In the Product Model, I have this relationship which points to the Orders
and in the Shipment Model, I have this which returns the ProductLots:
How can I define the Order/Shipment and ProductLot relationship with each other? I'm a little bit lost.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions