Is there plans to support an `only` filter for `1-...
# orm-help
j
Is there plans to support an
only
filter for
1-N
relations? Currently the options for
every
,
some
and
none
are limiting. It would be good to query
Copy code
children: {
  only: {
    field: "value"
  }
}
and it would return children that only match the filter
r
@Jared Fraser 👋
some
also returns the parent items that have at least 1 exact match for the filter in the relations.
👋 1
j
So I have a relation something along the lines of
Copy code
model Parent {
  id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
  children Child[] @relation("")
}

model Child {
  id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
  parent_id String @db.Uuid
  parent Parent
  created_at DateTime @default(dbgenerated("now():::TIMESTAMPTZ")) @map("created_at") @db.Timestamptz(6)
}
and I wanted to get a parent and the children that where created on a certain date, but not other children created on another date, is that possible with
some
?