Welcome Guest, Not a member yet? Register   Sign In
Entities and pivots
#3

Okay I’m running into this again in a library I’m making - seriously, how do people usually handle pivots in a model? In this case I have a users table and model, a groups table and model, and a groups_users pivot table for the many-to-many... If I want to get a user’s groups what does that look like in the model or entity? Anyone have ideas on best practices, common solutions? Currently I’m doing a join but only selecting the target table, but I feel like that has neither the efficient g of just grabbing IDs nor the robustness of returning an actual entity.
Reply


Messages In This Thread
Entities and pivots - by MGatner - 03-08-2019, 12:39 PM
RE: Entities and pivots - by MGatner - 03-10-2019, 10:26 AM
RE: Entities and pivots - by MGatner - 03-27-2019, 04:40 PM
RE: Entities and pivots - by kilishan - 03-27-2019, 07:17 PM
RE: Entities and pivots - by MGatner - 03-28-2019, 04:59 AM
RE: Entities and pivots - by MGatner - 04-12-2019, 06:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB