⬆ ️ deps(dev): Bump prisma from 3.5.0 to 3.11.1
Bumps prisma from 3.5.0 to 3.11.1.
Release notes
Sourced from prisma's releases.
3.11.1
Today, we are issuing the
3.11.1
patch release.MongoDB (Preview)
Breaking: Filters no longer return
undefined
fields by defaultIn
3.11.1
, we've changed what data is returned when filtering MongoDB documents onundefined
fields. The new rule is thatundefined
fields are excluded by default unless explicitly filtered for. This allows you to query for undefined and null values separately.Let's take a look at a concrete example. Given the following Prisma schema:
model Address { id Int @id @map("_id") city String street String? // Note that street is optional }
For Mongo, optional fields can either be
null
orundefined
(absent). The following documents are all valid for the schema above:{ "_id": 1, "city": "San Fransisco", "street": "Market st." } { "_id": 2, "city": "Seattle", "street": null } { "_id": 3, "city": "Chicago" }
Prior to
3.11.1
, if you queried forwhere: { street: null }
, you'd get_id: 2
and_id: 3
. In3.11.1
, you'll only get_id: 2
. The ability to also query for the missing fields has also been added. For details, refer to the newisSet
below to learn more.There are a few exceptions to this new default:
- A
having
filter on an aggregated field will returnundefined
fields. This is because aggregation on undefined fields yieldsnull
, notundefined
, thus matching the filter.- Filters on undefined to-many relations (e.g., the backing array of a many-to-many is
undefined
) will currently include those relations in the result set.New
isSet
filter operationTo compensate for missing fields on documents no longer being returned by the filters above, we’ve added a new
isSet: bool
filter. This filter can be used to include fields that areundefined
on documents.Using the example above, to include the
undefined
fields, you can use anOR
:await prisma.address.findMany({ where: { OR: [ { street: { isSet: false } }, { street: null } ] } })
... (truncated)
Commits
-
367aaed
chore: bump engines -
9f6f07f
feat(client): composite filtering (#12271) -
6561b8a
chore(deps): update engines to 3.11.0-46.c9f86866d2fb27b2066e5447ee7f6f65c46c... -
55bdc73
chore(readme): contribute with local repro (#12074) -
88b6265
chore(deps): update engines to 3.11.0-44.de508c1bd4bac0d723b519cc484e96e8c42f... -
a71a46c
chore(deps): update engines to 3.11.0-43.46710cce5c925c7223e8684ea24f44fbeae3... -
4529d5e
temp: Empty change to test CI -
7b2b6c7
test(version): Replace blanket sanitization of all version output value with ... -
2bf91d8
chore(deps): update engines to 3.11.0-42.e996df5d66a2314d1da15d31047f9777fc2f... -
13d68d7
chore(deps): update engines to 3.11.0-40.e996df5d66a2314d1da15d31047f9777fc2f... - Additional commits viewable in compare view