Mongoose 8.24.8

8.24.8
Fixed 6
  • Removing map paths now works cleanly, including maps nested under other paths in the schema
  • The map value schematype is kept as a single object when the schema is cloned
  • MongooseMap#has() now supports ObjectId keys
  • Document hydration uses the document's model when looking up a ref
  • The {MODEL} placeholder is replaced in custom cast error messages raised during document validation
  • Setters declared on the union path itself now run

From Mongoose

8.24.8 / 2026-11-02

  • fix(schema): remove map paths cleanly, including maps under nested paths (backport to 8.x) #16625 #16461 #16457 mrityunjay-pandey
  • fix(schema): keep the map value schematype a single object when cloning (backport to 8.x) #16624 #16473 mrityunjay-pandey
  • fix(map): support ObjectId keys in MongooseMap#has() (backport to 8.x #16634 mrityunjay-pandey
  • fix(hydration): use the doc model for looking up a ref (backport to 8.x) #16623 #16453 mrityunjay-pandey
  • fix(document): replace {MODEL} in custom cast error messages from document validation (backport to 8.x) #16622 #16480 mrityunjay-pandey
  • fix(schema): run setters declared on the union path itself (backport to 8.x) #16621 #16528 mrityunjay-pandey
View original

Upgraded? How did it go?

Discussion