Relational queries: many-to-many
How to exclude
xId
fields from findFirst
| findMany
method or i just need to use "Magical sql operator" :D.
And can I get rid of the usersToStudios
field?
9 Replies
you would have to check yourself, but you can specify the columns that get returned now if you don’t want any columns from the usesToStudio table correct me if i’m wrong, but you may be able to put an empty object there so it returns no columns
lmk if what is said didn’t make sense haha i just woke up
i did it as described in the doc.
sorry what part of this result are you trying to remove?
I'd my results to look like
oh okay I see so you're just trying to remove the object usersToGroups and place that result inside of the object
off the top of my head I don't know if there is a way to do it using relational queries that would be a better question for the devs
however I know you can do this if you were to create the query yourself as you can define the shape that gets returned in the
select()
part of the query😭
isn't that what you wanted?