From 2348b7ab85dab2cc064ef527c6b110bbad923786 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Tue, 26 Sep 2023 13:15:38 -0400 Subject: [PATCH] docs(migrating_to_8): add id setter change to migration guide Fix #13784 --- docs/migrating_to_8.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/migrating_to_8.md b/docs/migrating_to_8.md index 50fe962ed39..b9c8cf1346a 100644 --- a/docs/migrating_to_8.md +++ b/docs/migrating_to_8.md @@ -15,6 +15,7 @@ If you're still on Mongoose 6.x or earlier, please read the [Mongoose 6.x to 7.x * [Changed behavior for `findOneAndUpdate()` with `orFail()` and upsert](#changed-behavior-for-findoneandupdate-with-orfail-and-upsert) * [MongoDB Node Driver 6.0](#mongodb-node-driver-6) * [Removed `findOneAndRemove()`](#removed-findoneandremove) +* [Removed id Setter](#removed-id-setter)

Removed rawResult option for findOneAndUpdate()

@@ -54,3 +55,8 @@ There's a few noteable changes in MongoDB Node driver v6 that affect Mongoose: In Mongoose 7, `findOneAndRemove()` was an alias for `findOneAndDelete()` that Mongoose supported for backwards compatibility. Mongoose 8 no longer supports `findOneAndRemove()`. Use `findOneAndDelete()` instead. + +

Removed id Setter

+ +In Mongoose 7.4, Mongoose introduced an `id` setter that made `doc.id = '0'.repeat(24)` equivalent to `doc._id = '0'.repeat(24)`. +In Mongoose 8, that setter is now removed. \ No newline at end of file