DT
Join ServerDrizzle Team
help
RQB | using specific fields from a query against relations
is there a way to create a select filter that matches specific fields from a relation?
say i
say i
findMany
on posts and want to select all the posts where a relational one-to-many tags.name
is inArray
of a tagList
arraywe have a small example in docs
not sure if it's something you are looking for
i'm looking for something that might look like:
with:
where: (posts) => inArray(posts.tags.name, tagList)
with:
with: {
tags: {
name: true,
}
}
however
posts.tags
has a type of Many<"tags>"
that doesn't seem to allow for what i have in mind