many-many with
Hi. I have a schema with
users
, roles
and user_to_roles
tables. I also have a usersRelations
object, created with:
Is there a way to use with
in a relational query to get back a user object (or an array of user objects) with a roles
property containing an array of all roles for the user?1 Reply
I know that I can do:
and massage the result into what I want. But, I'm wondering whether there might be a way to get there using relational queries.