favorite & same product in different stores
ashroof7 opened this issue · comments
Ashraf Saleh commented
if a product is in different stores, and is saved to favorites. Favorite table use the barcode as a key, since all the copies of the product in all stores have the same barcode; we have a problem dealing with the different prices of the copies. Moreover, all the copies then are considered favorites, also if the user un-favorites a copy that implies un-favoriting the product (all copies).
i think a good solution maybe to use the id of the tuple<product, store> in table PRODUCT_STORE as a key.