Route to Many-to-Many relationship

Asked

Viewed 29 times

1

I have a related REST API question, if anyone can help, thank you very much.

I have two entities, Product and Store, which has a Many-to-Many relationship between them. A Product may be available in 1 or more Stores and, in turn, a Store may have 1 or more Products. So far, beauty.

But I need an exclusive route to add a Product to a Store and also an exclusive route to remove a Product from a Store. Relationship is simple, there is no extra column in the pivot table.

What approach would you use?

Once again, thank you.

  • I don’t think it’s a good idea to model the front-based application :|

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.