Skip to main content

Migrate to 9.0.0

These are the changes made for 9.0.0 that are breaking or just important to know

Important, Read this first

This Guide is written for migration from version 8.3.0 to 9.0.0, for versions >9.0.0 <10.0.0, please consult the CHANGELOG

Requirements changed

Mongoose 6.0 is now supported

Mongoose version 6.0.7 (and possibly higher) is now supported, for mongoose specific migration, look at the 6.0 migration guide

Class-transformer transform of "ObjectId" became broken

Since mongodb 5.0 (mongoose 6.0) the value in @Transform is not equals to obj[key] anymore, see the updated Class-Transformer Guide and the Issue about this

Build order for Class-to-Schema changed

The build order for Class-to-Schema (buildSchema) changed from "top-down" to "bottom-up"

Error "E007" got removed

The Error E007 got removed, because get and set options can be defined independently of eachother.

Error "E023" got merged into "E013"

The Error E023 got merged into E013.

Errors "E008" & "E015" & "E022" got merged into "E026"

The Errors E008 & E015 & E022 got merged into a new Error, E026.