Getting many through a join table.
I have tables user, role, and accessLevel. a user has one role, a role has many accessLevels and accessLevel can belong to many roles. hence a many to many. between role and accessLevel. Now I want to get user with his role and the role including the accessLevels. I'm able to retrieve user with roles and accessLevel but accessLevel is returning the join table records. I want to be able to get user.role.accessLevels, accessLevel being a record from accessLevel table.
0 Replies