Friday, March 31, 2017

Laravel MongoDB Moloquent Pivot tables

I'm have document that will be shared to multiple users. Users will have different roles for each document. In sql, I would make pivot table with additional field 'role'. In mongodb, i'm unable to create relationship through pivot table. I don't want to save data about sharing in my mongodb object, be cause it isn't relative data. What are other options? Thank you.



via Karolis Tička

Advertisement