Many-to-many relation with additional data

I am new to Parse and the NoSQL world and I would like some input on how to implement a many-to-many relation with additional data on the relation. Something like relation between a shopping cart and a product with an added quantity on that product.

In the SQL world I would just use a table that stores the IDs of both and a column for Quantity.

I could do that in Parse too but Iā€™m not sure if that is a good idea. Another Idea I had was to use an array and save an the relation manually. Not sure of that either.

I believe that a joint class would be the best approach: JavaScript Developers Guide | Parse

Basically for your example you will create a class called ShopingCartProduct with a pointer to ShoopingCart a pointer to Product and a number field to store the quantity.

2 Likes