UNPKG

259 kBMarkdownView Raw
15.5.12 / 2019-05-31
2===================
3 * fix(document): fix unexpected error when loading a document with a nested property named `schema` #7831
4 * fix(model): skip applying static hooks by default if static name conflicts with query middleware (re: mongoose-delete plugin) #7790
5 * fix(query): apply schema-level projections to the result of `findOneAndReplace()` #7654
6 * fix: upgrade mongodb driver -> 3.2.6
7 * docs(tutorials): add findOneAndUpdate() tutorial #7847
8 * docs(validation): add `updateOne()` and `updateMany()` to list of update validator operations #7845
9 * docs(model): make sure options lists in `update()` API line up #7842
10
115.5.11 / 2019-05-23
12===================
13 * fix(discriminator): allow numeric discriminator keys for embedded discriminators #7808
14 * chore: add Node.js 12 to travis build matrix #7784
15
165.5.10 / 2019-05-20
17===================
18 * fix(discriminator): allow user-defined discriminator path in schema #7807
19 * fix(query): ensure `findOneAndReplace()` sends `replacement` to server #7654
20 * fix(cast): allow `[]` as a value when casting `$nin` #7806
21 * docs(model): clarify that setters do run on `update()` by default #7801
22 * docs: fix typo in FAQ #7821 [jaona](https://github.com/jaona)
23
245.5.9 / 2019-05-16
25==================
26 * fix(query): skip schema setters when casting $regexp $options #7802 [Fonger](https://github.com/Fonger)
27 * fix(populate): don't skip populating doc array properties whose name conflicts with an array method #7782
28 * fix(populate): make populated virtual return undefined if not populated #7795
29 * fix(schema): handle custom setters in arrays of document arrays #7804 [Fonger](https://github.com/Fonger)
30 * docs(tutorials): add query casting tutorial #7789
31
325.5.8 / 2019-05-13
33==================
34 * fix(document): run pre save hooks on nested child schemas #7792
35 * fix(model): set $session() before validation middleware for bulkWrite/insertMany #7785 #7769 [Fonger](https://github.com/Fonger)
36 * fix(query): make `getPopulatedPaths()` return deeply populated paths #7757
37 * fix(query): suppress findAndModify deprecation warning when using `Model.findOneAndUpdate()` #7794
38 * fix: upgrade mongodb -> 3.2.4 #7794
39 * fix(document): handle a couple edge cases with atomics that happen when schema defines an array property named 'undefined' #7756
40 * docs(discriminator): correct function parameters #7786 [gfpacheco](https://github.com/gfpacheco)
41
425.5.7 / 2019-05-09
43==================
44 * fix(model): set $session() before pre save middleware runs when calling save() with options #7742
45 * fix(model): set $session before pre remove hooks run when calling remove() with options #7742
46 * fix(schema): support `remove()` on nested path #2398
47 * fix(map): handle setting populated map element to doc #7745
48 * fix(query): return rawResult when inserting with options `{new:false,upsert:true,rawResult:true}` #7774 #7770 [LiaanM](https://github.com/LiaanM)
49 * fix(schematype): remove internal `validators` option because it conflicts with Backbone #7720
50
515.5.6 / 2019-05-06
52==================
53 * fix(document): stop converting arrays to objects when setting non-schema path to array with strict: false #7733
54 * fix(array): make two Mongoose arrays `assert.deepEqual()` each other if they have the same values #7700
55 * fix(populate): support populating a path in a document array embedded in an array #7647
56 * fix(populate): set populate virtual count to 0 if local field is empty #7731
57 * fix(update): avoid throwing cast error if casting array filter that isn't in schema with strictQuery = false #7728
58 * docs: fix typo in `distinct()` description #7767 [phil-r](https://github.com/phil-r)
59
605.5.5 / 2019-04-30
61==================
62 * fix(document): ensure nested properties within single nested subdocs get set correctly when overwriting single nested subdoc #7748
63 * fix(document): skip non-object `validators` in schema types #7720
64 * fix: bump mongodb driver -> 3.2.3 #7752
65 * fix(map): disallow setting map key with special properties #7750 [Fonger](https://github.com/Fonger)
66
675.5.4 / 2019-04-25
68==================
69 * fix(document): avoid calling custom getters when saving #7719
70 * fix(timestamps): handle child schema timestamps correctly when reusing child schemas #7712
71 * fix(query): pass correct callback for _legacyFindAndModify #7736 [Fonger](https://github.com/Fonger)
72 * fix(model+query): allow setting `replacement` parameter for `findOneAndReplace()` #7654
73 * fix(map): make `delete()` unset the key in the database #7746 [Fonger](https://github.com/Fonger)
74 * fix(array): use symbol for `_schema` property to avoid confusing deep equality checks #7700
75 * fix(document): prevent `depopulate()` from removing fields with empty array #7741 #7740 [Fonger](https://github.com/Fonger)
76 * fix: make `MongooseArray#includes` support ObjectIds #7732 #6354 [hansemannn](https://github.com/hansemannn)
77 * fix(document): report correct validation error index when pushing onto doc array #7744 [Fonger](https://github.com/Fonger)
78
795.5.3 / 2019-04-22
80==================
81 * fix: add findAndModify deprecation warning that references the useFindAndModify option #7644
82 * fix(document): handle pushing a doc onto a discriminator that contains a doc array #7704
83 * fix(update): run setters on array elements when doing $set #7679
84 * fix: correct usage of arguments while buffering commands #7718 [rzymek](https://github.com/rzymek)
85 * fix(document): avoid error clearing modified subpaths if doc not defined #7715 [bitflower](https://github.com/bitflower)
86 * refactor(array): move `_parent` property behind a symbol #7726 #7700
87 * docs(model): list out all operations and options for `bulkWrite()` #7055
88 * docs(aggregate): use `eachAsync()` instead of nonexistent `each()` #7699
89 * docs(validation): add CastError validation example #7514
90 * docs(query+model): list out all options and callback details for Model.updateX() and Query#updateX() #7646
91
925.5.2 / 2019-04-16
93==================
94 * fix(document): support setting nested path to non-POJO object #7639
95 * perf(connection): remove leaked event handler in `Model.init()` so `deleteModel()` frees all memory #7682
96 * fix(timestamps): handle custom statics that conflict with built-in functions (like mongoose-delete plugin) #7698
97 * fix(populate): make `Document#populated()` work for populated subdocs #7685
98 * fix(document): support `.set()` on document array underneath embedded discriminator path #7656
99
1005.5.1 / 2019-04-11
101==================
102 * fix(document): correctly overwrite all properties when setting a single nested subdoc #7660 #7681
103 * fix(array): allow customization of array required validator #7696 [freewil](https://github.com/freewil)
104 * fix(discriminator): handle embedded discriminators when casting array defaults #7687
105 * fix(collection): ensure collection functions return a promise even if disconnected #7676
106 * fix(schematype): avoid indexing properties with `{ unique: false, index: false }` #7620
107 * fix(aggregate): make `Aggregate#model()` with no arguments return the aggregation's model #7608
108
1095.5.0 / 2019-04-08
110==================
111 * feat(model): support applying hooks to custom static functions #5982
112 * feat(populate): support specifying a function as `match` #7397
113 * perf(buffer): avoid calling `defineProperties()` in Buffer constructor #7331
114 * feat(connection): add `plugin()` for connection-scoped plugins #7378
115 * feat(model): add Model#deleteOne() and corresponding hooks #7538
116 * feat(query): support hooks for `Query#distinct()` #5938
117 * feat(model): print warning when calling create() incorrectly with a session #7535
118 * feat(document): add Document#isEmpty() and corresponding helpers for nested paths #5369
119 * feat(document): add `getters` option to Document#get() #7233
120 * feat(query): add Query#projection() to get or overwrite the current projection #7384
121 * fix(document): set full validator path on validatorProperties if `propsParameter` set on validator #7447
122 * feat(document): add Document#directModifiedPaths() #7373
123 * feat(document): add $locals property #7691
124 * feat(document): add validateUpdatedOnly option that only validates modified paths in `save()` #7492 [captaincaius](https://github.com/captaincaius)
125 * chore: upgrade MongoDB driver to v3.2.0 #7641
126 * fix(schematype): deprecate `isAsync` option for custom validators #6700
127 * chore(mongoose): deprecate global.MONGOOSE_DRIVER_PATH so we can be webpack-warning-free in 6.0 #7501
128
1295.4.23 / 2019-04-08
130===================
131 * fix(document): report cast error when string path in schema is an array in MongoDB #7619
132 * fix(query): set deletedCount on result of remove() #7629
133 * docs(subdocs): add note about parent() and ownerDocument() to subdocument docs #7576
134
1355.4.22 / 2019-04-04
136===================
137 * fix(aggregate): allow modifying options in pre('aggregate') hook #7606
138 * fix(map): correctly init maps of maps when loading from MongoDB #7630
139 * docs(model+query): add `omitUndefined` option to docs for updateX() and findOneAndX() #3486
140 * docs: removed duplicate Query.prototype.merge() reference from doc #7684 [shihabmridha](https://github.com/shihabmridha)
141 * docs(schema): fix shardKey type to object instead of bool #7668 [kyletsang](https://github.com/kyletsang)
142 * docs(api): fix `Model.prototypedelete` link #7665 [pixcai](https://github.com/pixcai)
143
1445.4.21 / 2019-04-02
145===================
146 * fix(updateValidators): run update validators correctly on Decimal128 paths #7561
147 * fix(update): cast array filters in nested doc arrays correctly #7603
148 * fix(document): allow .get() + .set() with aliased paths #7592
149 * fix(document): ensure custom getters on single nested subdocs don't get persisted if toObject.getters = true #7601
150 * fix(document): support setting subdoc path to subdoc copied using object rest `{...doc}` #7645
151 * docs(schema): correct out-of-date list of reserved words #7593
152 * docs(model+query): add link to update results docs and examples of using results of updateOne(), etc. #7582
153 * docs: use atomic as opposed to $atomic consistently #7649 [720degreeLotus](https://github.com/720degreeLotus)
154
1555.4.20 / 2019-03-25
156===================
157 * docs(tutorials): add tutorial about `lean()` #7640
158 * fix(discriminator): fix wrong modelName being used as value to partialFilterExpression index #7635 #7634 [egorovli](https://github.com/egorovli)
159 * fix(document): allow setters to modify `this` when overwriting single nested subdoc #7585
160 * fix(populate): handle count option correctly with multiple docs #7573
161 * fix(date): support declaring min/max validators as functions #7600 [ChienDevIT](https://github.com/ChienDevIT)
162 * fix(discriminator): avoid projecting in embedded discriminator if only auto-selected path is discriminator key #7574
163 * fix(discriminator): use discriminator model when using `new BaseModel()` with discriminator key #7586
164 * fix(timestamps): avoid throwing if doc array has timestamps and array is undefined #7625 [serg33v](https://github.com/serg33v)
165 * docs(document): explain DocumentNotFoundError in save() docs #7580
166 * docs(query): fix .all() param type and add example #7612 [720degreeLotus](https://github.com/720degreeLotus)
167 * docs: add useNewUrlParser to mongoose.connect for some pages #7615 [YC](https://github.com/YC)
168
1695.4.19 / 2019-03-11
170===================
171 * fix(mongoose): ensure virtuals set on subdocs in global plugins get applied #7592
172 * docs(tutorials): add "Working With Dates" tutorial #7597
173 * docs(guide): clarify that versioning only affects array fields #7555
174 * docs(model): list out all bulkWrite() options #7550
175
1765.4.18 / 2019-03-08
177===================
178 * fix(document): handle nested virtuals in populated docs when parent path is projected out #7491
179 * fix(model): make subclassed models handle discriminators correctly #7547
180 * fix(model): remove $versionError from save options for better debug output #7570
181
1825.4.17 / 2019-03-03
183===================
184 * fix(update): handle all positional operator when casting array filters #7540
185 * fix(populate): handle populating nested path where top-level path is a primitive in the db #7545
186 * fix(update): run update validators on array filters #7536
187 * fix(document): clean modified subpaths when sorting an array #7556
188 * fix(model): cast $setOnInsert correctly with nested docs #7534
189 * docs: remove extra curly brace from example #7569 [kolya182](https://github.com/kolya182)
190
1915.4.16 / 2019-02-26
192===================
193 * fix(schema): handle nested objects with `_id: false` #7524
194 * fix(schema): don't throw error if declaring a virtual that starts with a map path name #7464
195 * fix(browser): add stubbed `model()` function so code that uses model doesn't throw #7541 [caub](https://github.com/caub)
196 * fix(schema): merge virtuals correctly #7563 [yoursdearboy](https://github.com/yoursdearboy)
197 * docs(connections): add reconnectFailed to connection docs #7477
198 * docs(index): fix typo #7553 [DenrizSusam](https://github.com/DenrizSusam)
199 * refactor(schema): iterate over paths instead of depending on childSchemas #7554
200
2015.4.15 / 2019-02-22
202===================
203 * fix(update): don't call schematype validators on array if using $pull with runValidators #6971
204 * fix(schema): clone all schema types when cloning an array #7537
205 * docs(connections): improve connectTimeoutMS docs and socketTimeoutMS docs to link to Node.js net.setTimeout() #5169
206 * docs: fix setters example in migration guide #7546 [freewil](https://github.com/freewil)
207
2085.4.14 / 2019-02-19
209===================
210 * fix(populate): make `getters` option handle nested paths #7521
211 * fix(documentarray): report validation errors that occur in an array subdoc created using `create()` and then `set()` #7504
212 * docs(schema): add examples for schema functions that didn't have any #7525
213 * docs: add MongooseError to API docs and add list of error names
214 * docs(CONTRIBUTING): fix link #7530 [sarpik](https://github.com/sarpik)
215
2165.4.13 / 2019-02-15
217===================
218 * fix(query): throw handy error when using updateOne() with overwrite: true and no dollar keys #7475
219 * fix(schema): support inheriting existing schema types using Node.js `util.inherits` like mongoose-float #7486
220 * docs(connections): add list of connection events #7477
221
2225.4.12 / 2019-02-13
223===================
224 * fix(connection): dont emit reconnected due to socketTimeoutMS #7452
225 * fix(schema): revert check for `false` schema paths #7516 #7512
226 * fix(model): don't delete unaliased keys in translateAliases #7510 [chrischen](https://github.com/chrischen)
227 * fix(document): run single nested schematype validator if nested path has a default and subpath is modified #7493
228 * fix(query): copy mongoose options when using `Query#merge()` #1790
229 * fix(timestamps): don't call createdAt getters when setting updatedAt on new doc #7496
230 * docs: improve description of ValidationError #7515 [JulioJu](https://github.com/JulioJu)
231 * docs: add an asterisk before comment, otherwise the comment line is not generated #7513 [JulioJu](https://github.com/JulioJu)
232
2335.4.11 / 2019-02-09
234===================
235 * fix(schema): handle `_id: false` in schema paths as a shortcut for setting the `_id` option to `false` #7480
236 * fix(update): handle $addToSet and $push with ObjectIds and castNonArrays=false #7479
237 * docs(model): document `session` option to `save()` #7484
238 * chore: fix gitignore syntax #7498 [JulioJu](https://github.com/JulioJu)
239 * docs: document that Document#validateSync returns ValidationError #7499
240 * refactor: use consolidated `isPOJO()` function instead of constructor checks #7500
241
2425.4.10 / 2019-02-05
243===================
244 * docs: add search bar and /search page #6706
245 * fix: support dotted aliases #7478 [chrischen](https://github.com/chrischen)
246 * fix(document): copy atomics when setting document array to an existing document array #7472
247 * chore: upgrade to mongodb driver 3.1.13 #7488
248 * docs: remove confusing references to executing a query "immediately" #7461
249 * docs(guides+schematypes): link to custom schematypes docs #7407
250
2515.4.9 / 2019-02-01
252==================
253 * fix(document): make `remove()`, `updateOne()`, and `update()` use the document's associated session #7455
254 * fix(document): support passing args to hooked custom methods #7456
255 * fix(document): avoid double calling single nested getters on `toObject()` #7442
256 * fix(discriminator): handle global plugins modifying top-level discriminator options with applyPluginsToDiscriminators: true #7458
257 * docs(documents): improve explanation of documents and use more modern syntax #7463
258 * docs(middleware+api): fix a couple typos in examples #7474 [arniu](https://github.com/arniu)
259
2605.4.8 / 2019-01-30
261==================
262 * fix(query): fix unhandled error when casting object in array filters #7431
263 * fix(query): cast query $elemMatch to discriminator schema if discriminator key set #7449
264 * docs: add table of contents to all guides #7430
265
2665.4.7 / 2019-01-26
267==================
268 * fix(populate): set `populated()` when using virtual populate #7440
269 * fix(discriminator): defer applying plugins to embedded discriminators until model compilation so global plugins work #7435
270 * fix(schema): report correct pathtype underneath map so setting dotted paths underneath maps works #7448
271 * fix: get debug from options using the get helper #7451 #7446 [LucGranato](https://github.com/LucGranato)
272 * fix: use correct variable name #7443 [esben-semmle](https://github.com/esben-semmle)
273 * docs: fix broken QueryCursor link #7438 [shihabmridha](https://github.com/shihabmridha)
274
2755.4.6 / 2019-01-22
276==================
277 * fix(utils): make minimize leave empty objects in arrays instead of setting the array element to undefined #7322
278 * fix(document): support passing `{document, query}` options to Schema#pre(regex) and Schema#post(regex) #7423
279 * docs: add migrating to 5 guide to docs #7434
280 * docs(deprecations): add instructions for fixing `count()` deprecation #7419
281 * docs(middleware): add description and example for aggregate hooks #7402
282
2834.13.18 / 2019-01-21
284====================
285 * fix(model): handle setting populated path set via `Document#populate()` #7302
286 * fix(cast): backport fix from #7290 to 4.x
287
2885.4.5 / 2019-01-18
289==================
290 * fix(populate): handle nested array `foreignField` with virtual populate #7374
291 * fix(query): support not passing any arguments to `orFail()` #7409
292 * docs(query): document what the resolved value for `deleteOne()`, `deleteMany()`, and `remove()` contains #7324
293 * fix(array): allow opting out of converting non-arrays into arrays with `castNonArrays` option #7371
294 * fix(query): ensure updateOne() doesnt unintentionally double call Schema#post(regexp) #7418
295
2965.4.4 / 2019-01-14
297==================
298 * fix(query): run casting on arrayFilters option #7079
299 * fix(document): support skipping timestamps on save() with `save({ timestamps: false })` #7357
300 * fix(model): apply custom where on `Document#remove()` so we attach the shardKey #7393
301 * docs(mongoose): document `mongoose.connections` #7338
302
3035.4.3 / 2019-01-09
304==================
305 * fix(populate): handle `count` option when using `Document#populate()` on a virtual #7380
306 * fix(connection): set connection state to DISCONNECTED if replica set has no primary #7330
307 * fix(mongoose): apply global plugins to schemas nested underneath embedded discriminators #7370
308 * fix(document): make modifiedPaths() return nested paths 1 level down on initial set #7313
309 * fix(plugins): ensure sharding plugin works even if ObjectId has a `valueOf()` #7353
310
3115.4.2 / 2019-01-03
312==================
313 * fix(document): ensure Document#updateOne() returns a query but still calls hooks #7366
314 * fix(query): allow explicitly projecting out populated paths that are automatically projected in #7383
315 * fix(document): support setting `flattenMaps` option for `toObject()` and `toJSON()` at schema level #7274
316 * fix(query): handle merging objectids with `.where()` #7360
317 * fix(schema): copy `.base` when cloning #7377
318 * docs: remove links to plugins.mongoosejs.com in favor of plugins.mongoosejs.io #7364
319
3205.4.1 / 2018-12-26
321==================
322 * fix(document): ensure doc array defaults get casted #7337
323 * fix(document): make `save()` not crash if nested doc has a property 'get' #7316
324 * fix(schema): allow using Schema.Types.Map as well as Map to declare a map type #7305
325 * fix(map): make set after init mark correct path as modified #7321
326 * fix(mongoose): don't recompile model if same collection and schema passed in to `mongoose.model()` #5767
327 * fix(schema): improve error message when type is invalid #7303
328 * fix(schema): add `populated` to reserved property names #7317
329 * fix(model): don't run built-in middleware on custom methods and ensure timestamp hooks don't run if children don't have timestamps set #7342
330 * docs(schematypes): clarify that you can add arbitrary options to a SchemaType #7340
331 * docs(mongoose): clarify that passing same name+schema to `mongoose.model()` returns the model #5767
332 * docs(index): add useNewUrlParser to example #7368 [JIBIN-P](https://github.com/JIBIN-P)
333 * docs(connection): add useNewUrlParser to examples #7362 [JIBIN-P](https://github.com/JIBIN-P)
334 * docs(discriminators): add back missing example from 'recursive embedded discriminators section' #7349
335 * docs(schema): improve docs for string and boolean cast() #7351
336
3375.4.0 / 2018-12-14
338==================
339 * feat(schematype): add `SchemaType.get()`, custom getters across all instances of a schematype #6912
340 * feat(schematype): add `SchemaType.cast()`, configure casting for individual schematypes #7045
341 * feat(schematype): add `SchemaType.checkRequired()`, configure what values pass `required` check for a schematype #7186 #7150
342 * feat(model): add `Model.findOneAndReplace()` #7162
343 * feat(model): add `Model.events` emitter that emits all `error`'s that occur with a given model #7125
344 * feat(populate): add `count` option to populate virtuals, support returning # of populated docs instead of docs themselves #4469
345 * feat(aggregate): add `.catch()` helper to make aggregations full thenables #7267
346 * feat(query): add hooks for `deleteOne()` and `deleteMany()` #7195
347 * feat(document): add hooks for `updateOne()` #7133
348 * feat(query): add `Query#map()` for synchronously transforming results before post middleware runs #7142
349 * feat(schema): support passing an array of objects or schemas to `Schema` constructor #7218
350 * feat(populate): add `clone` option to ensure multiple docs don't share the same populated doc #3258
351 * feat(query): add `Query#maxTimeMS()` helper #7254
352 * fix(query): deprecate broken `Aggregate#addCursorFlag()` #7120
353 * docs(populate): fix incorrect example #7335 [zcfan](https://github.com/zcfan)
354 * docs(middleware): add `findOneAndDelete` to middleware list #7327 [danielkesselberg](https://github.com/danielkesselberg)
355
3565.3.16 / 2018-12-11
357===================
358 * fix(document): handle `__proto__` in queries #7290
359 * fix(document): use Array.isArray() instead of checking constructor name for arrays #7290
360 * docs(populate): add section about what happens when no document matches #7279
361 * fix(mongoose): avoid crash on `import mongoose, {Schema} from 'mongoose'` #5648
362
3635.3.15 / 2018-12-05
364===================
365 * fix(query): handle `orFail()` with `findOneAndUpdate()` and `findOneAndDelete()` #7297 #7280
366 * fix(document): make `save()` succeed if strict: false with a `collection` property #7276
367 * fix(document): add `flattenMaps` option for toObject() #7274
368 * docs(document): document flattenMaps option #7274
369 * fix(populate): support populating individual subdoc path in document array #7273
370 * fix(populate): ensure `model` option overrides `refPath` #7273
371 * fix(map): don't call subdoc setters on init #7272
372 * fix(document): use internal get() helper instead of lodash.get to support `null` projection param #7271
373 * fix(document): continue running validateSync() for all elements in doc array after first error #6746
374
3755.3.14 / 2018-11-27
376===================
377 * docs(api): use `openUri()` instead of legacy `open()` #7277 [artemjackson](https://github.com/artemjackson)
378 * fix(document): don't mark date underneath single nested as modified if setting to string #7264
379 * fix(update): set timestamps on subdocs if not using $set with no overwrite #7261
380 * fix(document): use symbol instead of `__parent` so user code doesn't conflict #7230
381 * fix(mongoose): allow using `mongoose.model()` without context, like `import {model} from 'mongoose'` #3768
382
3835.3.13 / 2018-11-20
384===================
385 * fix: bump mongodb driver -> 3.1.10 #7266
386 * fix(populate): support setting a model as a `ref` #7253
387 * docs(schematype): add ref() function to document what is a valid `ref` path in a schematype #7253
388 * fix(array): clean modified subpaths when calling `splice()` #7249
389 * docs(compatibility): don't show Mongoose 4.11 as compatible with MongoDB 3.6 re: MongoDB's official compatibility table #7248 [a-harrison](https://github.com/a-harrison)
390 * fix(document): report correct validation error if doc array set to primitive #7242
391 * fix(mongoose): print warning when including server-side lib with jest jsdom environment #7240
392
3935.3.12 / 2018-11-13
394===================
395 * docs(compatibility): don't show Mongoose 4.11 as compatible with MongoDB 3.6 re: MongoDB's official compatibility table #7238 [a-harrison](https://github.com/a-harrison)
396 * fix(populate): use `instanceof` rather than class name for comparison #7237 [ivanseidel](https://github.com/ivanseidel)
397 * docs(api): make options show up as a nested list #7232
398 * fix(document): don't mark array as modified on init if doc array has default #7227
399 * docs(api): link to bulk write result object in `bulkWrite()` docs #7225
400
4015.3.11 / 2018-11-09
402===================
403 * fix(model): make parent pointers non-enumerable so they don't crash JSON.stringify() #7220
404 * fix(document): allow saving docs with nested props with '.' using `checkKeys: false` #7144
405 * docs(lambda): use async/await with lambda example #7019
406
4075.3.10 / 2018-11-06
408===================
409 * fix(discriminator): support reusing a schema for multiple discriminators #7200
410 * fix(cursor): handle `lean(false)` correctly with query cursors #7197
411 * fix(document): avoid manual populate if `ref` not set #7193
412 * fix(schema): handle schema without `.base` for browser build #7170
413 * docs: add further reading section
414
4155.3.9 / 2018-11-02
416==================
417 * fix: upgrade bson dep -> 1.1.0 to match mongodb-core #7213 [NewEraCracker](https://github.com/NewEraCracker)
418 * docs(api): fix broken anchor link #7210 [gfranco93](https://github.com/gfranco93)
419 * fix: don't set parent timestamps because a child has timestamps set to false #7203 #7202 [lineus](https://github.com/lineus)
420 * fix(document): run setter only once when doing `.set()` underneath a single nested subdoc #7196
421 * fix(document): surface errors in subdoc pre validate #7187
422 * fix(query): run default functions after hydrating the loaded document #7182
423 * fix(query): handle strictQuery: 'throw' with nested path correctly #7178
424 * fix(update): update timestamps on replaceOne() #7152
425 * docs(transactions): add example of aborting a transaction #7113
426
4275.3.8 / 2018-10-30
428==================
429 * fix: bump mongodb driver -> 3.1.8 to fix connecting to +srv uri with no credentials #7191 #6881 [lineus](https://github.com/lineus)
430 * fix(document): sets defaults correctly in child docs with projection #7159
431 * fix(mongoose): handle setting custom type on a separate mongoose global #7158
432 * fix: add unnecessary files to npmignore #7157
433 * fix(model): set session when creating new subdoc #7104
434
4355.3.7 / 2018-10-26
436==================
437 * fix(browser): fix buffer usage in browser build #7184 #7173 [lineus](https://github.com/lineus)
438 * fix(document): make depopulate() work on populate virtuals and unpopulated docs #7180 #6075 [lineus](https://github.com/lineus)
439 * fix(document): only pass properties as 2nd arg to custom validator if `propsParameter` set #7145
440 * docs(schematypes): add note about nested paths with `type` getting converted to mixed #7143
441 * fix(update): run update validators on nested doc when $set on an array #7135
442 * fix(update): copy exact errors from array subdoc validation into top-level update validator error #7135
443
4445.3.6 / 2018-10-23
445==================
446 * fix(cursor): fix undefined transforms error
447
4485.3.5 / 2018-10-22
449==================
450 * fix(model): make sure versionKey on `replaceOne()` always gets set at top level to prevent cast errors #7138
451 * fix(cursor): handle non-boolean lean option in `eachAsync()` #7137
452 * fix(update): correct cast update that overwrites a map #7111
453 * fix(schema): handle arrays of mixed correctly #7109
454 * fix(query): use correct path when getting schema for child timestamp update #7106
455 * fix(document): make `$session()` propagate sessions to child docs #7104
456 * fix(document): handle user setting `schema.options.strict = 'throw'` #7103
457 * fix(types): use core Node.js buffer prototype instead of safe-buffer because safe-buffer is broken for Node.js 4.x #7102
458 * fix(document): handle setting single doc with refPath to document #7070
459 * fix(model): handle array filters when updating timestamps for subdocs #7032
460
4615.3.4 / 2018-10-15
462==================
463 * fix(schema): make `add()` and `remove()` return the schema instance #7131 [lineus](https://github.com/lineus)
464 * fix(query): don't require passing model to `cast()` #7118
465 * fix: support `useFindAndModify` as a connection-level option #7110 [lineus](https://github.com/lineus)
466 * fix(populate): handle plus path projection with virtual populate #7050
467 * fix(schema): allow using ObjectId type as schema path type #7049
468 * docs(schematypes): elaborate on how schematypes relate to types #7049
469 * docs(deprecations): add note about gridstore deprecation #6922
470 * docs(guide): add storeSubdocValidationError option to guide #6802
471
4725.3.3 / 2018-10-12
473==================
474 * fix(document): enable storing mongoose validation error in MongoDB by removing `$isValidatorError` property #7127
475 * docs(api): clarify that aggregate triggers aggregate middleware #7126 [lineus](https://github.com/lineus)
476 * fix(connection): handle Model.init() when an index exists on schema + autoCreate == true #7122 [jesstelford](https://github.com/jesstelford)
477 * docs(middleware): explain how to switch between document and query hooks for `remove()` #7093
478 * docs(api): clean up encoding issues in SchemaType.prototype.validate docs #7091
479 * docs(schema): add schema types to api docs and update links on schematypes page #7080 #7076 [lineus](https://github.com/lineus)
480 * docs(model): expand model constructor docs with examples and `fields` param #7077
481 * docs(aggregate): remove incorrect description of noCursorTimeout and add description of aggregate options #7056
482 * docs: re-add array type to API docs #7027
483 * docs(connections): add note about `members.host` errors due to bad host names in replica set #7006
484
4855.3.2 / 2018-10-07
486==================
487 * fix(query): make sure to return correct result from `orFail()` #7101 #7099 [gsandorx](https://github.com/gsandorx)
488 * fix(schema): handle `{ timestamps: false }` correctly #7088 #7074 [lineus](https://github.com/lineus)
489 * docs: fix markdown in options.useCreateIndex documentation #7085 [Cyral](https://github.com/Cyral)
490 * docs(schema): correct field name in timestamps example #7082 [kizmo04](https://github.com/kizmo04)
491 * docs(migrating_to_5): correct markdown syntax #7078 [gwuah](https://github.com/gwuah)
492 * fix(connection): add useFindAndModify option in connect #7059 [NormanPerrin](https://github.com/NormanPerrin)
493 * fix(document): dont mark single nested path as modified if setting to the same value #7048
494 * fix(populate): use WeakMap to track lean populate models rather than leanPopulateSymbol #7026
495 * fix(mongoose): avoid unhandled rejection when `mongoose.connect()` errors with a callback #6997
496 * fix(mongoose): isolate Schema.Types between custom Mongoose instances #6933
497
4985.3.1 / 2018-10-02
499==================
500 * fix(ChangeStream): expose driver's `close()` function #7068 #7022 [lineus](https://github.com/lineus)
501 * fix(model): avoid printing warning if `_id` index is set to "hashed" #7053
502 * fix(populate): handle nested populate underneath lean array correctly #7052
503 * fix(update): make timestamps not crash on a null or undefined update #7041
504 * docs(schematypes+validation): clean up links from validation docs to schematypes docs #7040
505 * fix(model): apply timestamps to nested docs in bulkWrite() #7032
506 * docs(populate): rewrite refPath docs to be simpler and more direct #7013
507 * docs(faq): explain why destructuring imports are not supported in FAQ #7009
508
5095.3.0 / 2018-09-28
510==================
511 * feat(mongoose): support `mongoose.set('debug', WritableStream)` so you can pipe debug to stderr, file, or network #7018
512 * feat(query): add useNestedStrict option #6973 #5144 [lineus](https://github.com/lineus)
513 * feat(query): add getPopulatedPaths helper to Query.prototype #6970 #6677 [lineus](https://github.com/lineus)
514 * feat(model): add `createCollection()` helper to make transactions easier #6948 #6711 [Fonger](https://github.com/Fonger)
515 * feat(schema): add ability to do `schema.add(otherSchema)` to merge hooks, virtuals, etc. #6897
516 * feat(query): add `orFail()` helper that throws an error if no documents match `filter` #6841
517 * feat(mongoose): support global toObject and toJSON #6815
518 * feat(connection): add deleteModel() to remove a model from a connection #6813
519 * feat(mongoose): add top-level mongoose.ObjectId, mongoose.Decimal128 for easier schema declarations #6760
520 * feat(aggregate+query): support for/await/of (async iterators) #6737
521 * feat(mongoose): add global `now()` function that you can stub for testing timestamps #6728
522 * feat(schema): support `schema.pre(RegExp, fn)` and `schema.post(RegExp, fn)` #6680
523 * docs(query): add better docs for the `mongooseOptions()` function #6677
524 * feat(mongoose): add support for global strict object #6858
525 * feat(schema+mongoose): add autoCreate option to automatically create collections #6489
526 * feat(update): update timestamps on nested subdocs when using `$set` #4412
527 * feat(query+schema): add query `remove` hook and ability to switch between query `remove` and document `remove` middleware #3054
528
5295.2.18 / 2018-09-27
530===================
531 * docs(migrating_to_5): add note about overwriting filter properties #7030
532 * fix(query): correctly handle `select('+c')` if c is not in schema #7017
533 * fix(document): check path exists before checking for required #6974
534 * fix(document): retain user-defined key order on initial set with nested docs #6944
535 * fix(populate): handle multiple localFields + foreignFields using `localField: function() {}` syntax #5704
536
5375.2.17 / 2018-09-21
538===================
539 * docs(guide): clarify that Mongoose only increments versionKey on `save()` and add a workaround for `findOneAndUpdate()` #7038
540 * fix(model): correctly handle `createIndex` option to `ensureIndexes()` #7036 #6922 [lineus](https://github.com/lineus)
541 * docs(migrating_to_5): add a note about changing debug output from stderr to stdout #7034 #7018 [lineus](https://github.com/lineus)
542 * fix(query): add `setUpdate()` to allow overwriting update without changing op #7024 #7012 [lineus](https://github.com/lineus)
543 * fix(update): find top-level version key even if there are `$` operators in the update #7003
544 * docs(model+query): explain which operators `count()` supports that `countDocuments()` doesn't #6911
545
5465.2.16 / 2018-09-19
547===================
548 * fix(index): use dynamic require only when needed for better webpack support #7014 #7010 [jaydp17](https://github.com/jaydp17)
549 * fix(map): handle arrays of mixed maps #6995
550 * fix(populate): leave justOne as null if populating underneath a Mixed type #6985
551 * fix(populate): add justOne option to allow overriding any bugs with justOne #6985
552 * fix(query): add option to skip adding timestamps to an update #6980
553 * docs(model+schematype): improve docs about background indexes and init() #6966
554 * fix: bump mongodb -> 3.1.6 to allow connecting to srv url without credentials #6955 #6881 [lineus](https://github.com/lineus)
555 * fix(connection): allow specifying `useCreateIndex` at the connection level, overrides global-level #6922
556 * fix(schema): throw a helpful error if setting `ref` to an invalid value #6915
557
5585.2.15 / 2018-09-15
559===================
560 * fix(populate): handle virtual justOne correctly if it isn't set #6988
561 * fix(populate): consistently use lowercase `model` instead of `Model` so double-populating works with existing docs #6978
562 * fix(model): allow calling `Model.init()` again after calling `dropDatabase()` #6967
563 * fix(populate): find correct justOne when double-populating underneath an array #6798
564 * docs(webpack): make webpack docs use es2015 preset for correct libs and use acorn to test output is valid ES5 #6740
565 * fix(populate): add selectPopulatedPaths option to opt out of auto-adding `populate()`-ed fields to `select()` #6546
566 * fix(model): set timestamps on bulkWrite `insertOne` and `replaceOne` #5708
567
5685.2.14 / 2018-09-09
569===================
570 * docs: fix wording on promise docs to not imply queries only return promises #6983 #6982 [lineus](https://github.com/lineus)
571 * fix(map): throw TypeError if keys are not string #6956
572 * fix(document): ensure you can `validate()` a child doc #6931
573 * fix(populate): avoid cast error if refPath points to localFields with 2 different types #6870
574 * fix(populate): handle populating already-populated paths #6839
575 * fix(schematype): make ObjectIds handle refPaths when checking required #6714
576 * fix(model): set timestamps on bulkWrite() updates #5708
577
5785.2.13 / 2018-09-04
579===================
580 * fix(map): throw TypeError if keys are not string #6968 [Fonger](https://github.com/Fonger)
581 * fix(update): make array op casting work with strict:false and {} #6962 #6952 [lineus](https://github.com/lineus)
582 * fix(document): add doc.deleteOne(), doc.updateOne(), doc.replaceOne() re: deprecation warnings #6959 #6940 [lineus](https://github.com/lineus)
583 * docs(faq+schematypes): add note about map keys needing to be strings #6957 #6956 [lineus](https://github.com/lineus)
584 * fix(schematype): remove unused if statement #6950 #6949 [cacothi](https://github.com/cacothi)
585 * docs: add /docs/deprecations.html for dealing with MongoDB driver deprecation warnings #6922
586 * fix(populate): handle refPath where first element in array has no refPath #6913
587 * fix(mongoose): allow setting useCreateIndex option after creating a model but before initial connection succeeds #6890
588 * fix(updateValidators): ensure $pull validators always get an array #6889
589
5905.2.12 / 2018-08-30
591===================
592 * fix(document): disallow setting `constructor` and `prototype` if strict mode false
593
5944.13.17 / 2018-08-30
595====================
596 * fix(document): disallow setting `constructor` and `prototype` if strict mode false
597
5985.2.11 / 2018-08-30
599===================
600 * fix(document): disallow setting __proto__ if strict mode false
601 * fix(document): run document middleware on docs embedded in maps #6945 #6938 [Fonger](https://github.com/Fonger)
602 * fix(query): make castForQuery return a CastError #6943 #6927 [lineus](https://github.com/lineus)
603 * fix(query): use correct `this` scope when casting query with legacy 2dsphere pairs defined in schema #6939 #6937 [Fonger](https://github.com/Fonger)
604 * fix(document): avoid crash when calling `get()` on deeply nested subdocs #6929 #6925 [jakemccloskey](https://github.com/jakemccloskey)
605 * fix(plugins): make saveSubdocs execute child post save hooks _after_ the actual save #6926
606 * docs: add dbName to api docs for .connect() #6923 [p722](https://github.com/p722)
607 * fix(populate): convert to array when schema specifies array, even if doc doesn't have an array #6908
608 * fix(populate): handle `justOne` virtual populate underneath array #6867
609 * fix(model): dont set versionKey on upsert if it is already `$set` #5973
610
6114.13.16 / 2018-08-30
612====================
613 * fix(document): disallow setting __proto__ if strict mode false
614 * feat(error): backport adding modified paths to VersionError #6928 [freewil](https://github.com/freewil)
615
6165.2.10 / 2018-08-27
617===================
618 * fix: bump mongodb driver -> 3.1.4 #6920 #6903 #6884 #6799 #6741 [Fonger](https://github.com/Fonger)
619 * fix(model): track `session` option for `save()` as the document's `$session()` #6909
620 * fix(query): add Query.getOptions() helper #6907 [Fonger](https://github.com/Fonger)
621 * fix(document): ensure array atomics get cleared after save() #6900
622 * fix(aggregate): add missing redact and readConcern helpers #6895 [Fonger](https://github.com/Fonger)
623 * fix: add global option `mongoose.set('useCreateIndex', true)` to avoid ensureIndex deprecation warning #6890
624 * fix(query): use `projection` option to avoid deprecation warnings #6888 #6880 [Fonger](https://github.com/Fonger)
625 * fix(query): use `findOneAndReplace()` internally if using `overwrite: true` with `findOneAndUpdate()` #6888 [Fonger](https://github.com/Fonger)
626 * fix(document): ensure required cache gets cleared correctly between subsequent saves #6892
627 * fix(aggregate): support session chaining correctly #6886 #6885 [Fonger](https://github.com/Fonger)
628 * fix(query): use `projection` instead of `fields` internally for `find()` and `findOne()` to avoid deprecation warning #6880
629 * fix(populate): add `getters` option to opt in to calling getters on populate #6844
630
6315.2.9 / 2018-08-17
632==================
633 * fix(document): correctly propagate write concern options in save() #6877 [Fonger](https://github.com/Fonger)
634 * fix: upgrade mongodb driver -> 3.1.3 for numerous fixes #6869 #6843 #6692 #6670 [simllll](https://github.com/simllll)
635 * fix: correct `this` scope of default functions for DocumentArray and Array #6868 #6840 [Fonger](https://github.com/Fonger)
636 * fix(types): support casting JSON form of buffers #6866 #6863 [Fonger](https://github.com/Fonger)
637 * fix(query): get global runValidators option correctly #6865 #6578
638 * fix(query): add Query.prototype.setQuery() analogous to `getQuery()` #6855 #6854
639 * docs(connections): add note about the `family` option for IPv4 vs IPv6 and add port to example URIs #6784
640 * fix(query): get global runValidators option correctly #6578
641
6424.13.15 / 2018-08-14
643====================
644 * fix(mongoose): add global `usePushEach` option for easier Mongoose 4.x + MongoDB 3.6 #6858
645 * chore: fix flakey tests for 4.x #6853 [Fonger](https://github.com/Fonger)
646 * feat(error): add version number to VersionError #6852 [freewil](https://github.com/freewil)
647
6485.2.8 / 2018-08-13
649==================
650 * docs: update `execPopulate()` code example #6851 [WJakub](https://github.com/WJakub)
651 * fix(document): allow passing callback to `execPopulate()` #6851
652 * fix(populate): populate with undefined fields without error #6848 #6845 [Fonger](https://github.com/Fonger)
653 * docs(migrating_to_5): Add `objectIdGetter` option docs #6842 [jwalton](https://github.com/jwalton)
654 * chore: run lint in parallel and only on Node.js v10 #6836 [Fonger](https://github.com/Fonger)
655 * fix(populate): throw helpful error if refPath excluded in query #6834
656 * docs(migrating_to_5): add note about removing runSettersOnQuery #6832
657 * fix: use safe-buffer to avoid buffer deprecation errors in Node.js 10 #6829 [Fonger](https://github.com/Fonger)
658 * docs(query): fix broken links #6828 [yaynick](https://github.com/yaynick)
659 * docs(defaults): clarify that defaults only run on undefined #6827
660 * chore: fix flakey tests #6824 [Fonger](https://github.com/Fonger)
661 * docs: fix custom inspect function deprecation warning in Node.js 10 #6821 [yelworc](https://github.com/yelworc)
662 * fix(document): ensure subdocs get set to init state after save() so validators can run again #6818
663 * fix(query): make sure embedded query casting always throws a CastError #6803
664 * fix(document): ensure `required` function only gets called once when validating #6801
665 * docs(connections): note that you must specify port if using `useNewUrlParser: true` #6789
666 * fix(populate): support `options.match` in virtual populate schema definition #6787
667 * fix(update): strip out virtuals from updates if strict: 'throw' rather than returning an error #6731
668
6695.2.7 / 2018-08-06
670==================
671 * fix(model): check `expireAfterSeconds` option when diffing indexes in syncIndexes() #6820 #6819 [christopherhex](https://github.com/christopherhex)
672 * chore: fix some common test flakes in travis #6816 [Fonger](https://github.com/Fonger)
673 * chore: bump eslint and webpack to avoid bad versions of eslint-scope #6814
674 * test(model): add delay to session tests to improve pass rate #6811 [Fonger](https://github.com/Fonger)
675 * fix(model): support options in `deleteMany` #6810 [Fonger](https://github.com/Fonger)
676 * fix(query): don't use $each when pushing an array into an array #6809 [lineus](https://github.com/lineus)
677 * chore: bump mquery so eslint isn't a prod dependency #6800
678 * fix(populate): correctly get schema type when calling `populate()` on already populated path #6798
679 * fix(populate): propagate readConcern options in populate from parent query #6792 #6785 [Fonger](https://github.com/Fonger)
680 * docs(connection): add description of useNewUrlParser option #6789
681 * fix(query): make select('+path') a no-op if no select prop in schema #6785
682 * docs(schematype+validation): document using function syntax for custom validator message #6772
683 * fix(update): throw CastError if updating with `$inc: null` #6770
684 * fix(connection): throw helpful error when calling `createConnection(undefined)` #6763
685
6865.2.6 / 2018-07-30
687==================
688 * fix(document): don't double-call deeply nested custom getters when using `get()` #6779 #6637
689 * fix(query): upgrade mquery for readConcern() helper #6777
690 * docs(schematypes): clean up typos #6773 [sajadtorkamani](https://github.com/sajadtorkamani)
691 * refactor(browser): fix webpack warnings #6771 #6705
692 * fix(populate): make error reported when no `localField` specified catchable #6767
693 * docs(connection): use correct form in createConnection example #6766 [lineus](https://github.com/lineus)
694 * fix(connection): throw helpful error when using legacy `mongoose.connect()` syntax #6756
695 * fix(document): handle overwriting `$session` in `execPopulate()` #6754
696 * fix(query): propagate top-level session down to `populate()` #6754
697 * fix(aggregate): add `session()` helper for consistency with query api #6752
698 * fix(map): avoid infinite recursion when update overwrites a map #6750
699 * fix(model): be consistent about passing noop callback to mongoose.model() `init()` as well as db.model() #6707
700
7015.2.5 / 2018-07-23
702==================
703 * fix(boolean): expose `convertToTrue` and `convertToFalse` for custom boolean casting #6758
704 * docs(schematypes): add note about what values are converted to booleans #6758
705 * fix(document): fix(document): report castError when setting single nested doc to array #6753
706 * docs: prefix mongoose.Schema call with new operator #6751 [sajadtorkamani](https://github.com/sajadtorkamani)
707 * docs(query): add examples and links to schema writeConcern option for writeConcern helpers #6748
708 * docs(middleware): clarify that init middleware is sync #6747
709 * perf(model): create error rather than modifying stack for source map perf #6735
710 * fix(model): throw helpful error when passing object to aggregate() #6732
711 * fix(model): pass Model instance as context to applyGetters when calling getters for virtual populate #6726 [lineus](https://github.com/lineus)
712 * fix(documentarray): remove `isNew` and `save` listeners on CastError because otherwise they never get removed #6723
713 * docs(model+query): clarify when to use `countDocuments()` vs `estimatedDocumentCount()` #6713
714 * fix(populate): correctly set virtual nestedSchemaPath when calling populate() multiple times #6644
715 * docs(connections): add note about the `family` option for IPv4 vs IPv6 and add port to example URIs #6566
716
7175.2.4 / 2018-07-16
718==================
719 * docs: Model.insertMany rawResult option in api docs #6724 [lineus](https://github.com/lineus)
720 * docs: fix typo on migrating to 5 guide #6722 [iagowp](https://github.com/iagowp)
721 * docs: update doc about keepalive #6719 #6718 [simllll](https://github.com/simllll)
722 * fix: ensure debug mode doesn't crash with sessions #6712
723 * fix(document): report castError when setting single nested doc to primitive value #6710
724 * fix(connection): throw helpful error if using `new db.model(foo)(bar)` #6698
725 * fix(model): throw readable error with better stack trace when non-cb passed to $wrapCallback() #6640
726
7275.2.3 / 2018-07-11
728==================
729 * fix(populate): if a getter is defined on the localField, use it when populating #6702 #6618 [lineus](https://github.com/lineus)
730 * docs(schema): add example of nested aliases #6671
731 * fix(query): add `session()` function to queries to avoid positional argument mistakes #6663
732 * docs(transactions): use new session() helper to make positional args less confusing #6663
733 * fix(query+model+schema): add support for `writeConcern` option and writeConcern helpers #6620
734 * docs(guide): add `writeConcern` option and re-add description for `safe` option #6620
735 * docs(schema): fix broken API links #6619
736 * docs(connections): add information re: socketTimeoutMS and connectTimeoutMS #4789
737
7385.2.2 / 2018-07-08
739==================
740 * fix(model+query): add missing estimatedDocumentCount() function #6697
741 * docs(faq): improve array-defaults section #6695 [lineus](https://github.com/lineus)
742 * docs(model): fix countDocuments() docs, bad copy/paste from count() docs #6694 #6643
743 * fix(connection): add `startSession()` helper to connection and mongoose global #6689
744 * fix: upgrade mongodb driver -> 3.1.1 for countDocuments() fix #6688 #6666
745 * docs(compatibility): add MongoDB 4 range #6685
746 * fix(populate): add ability to define refPath as a function #6683 [lineus](https://github.com/lineus)
747 * docs: add rudimentary transactions guide #6672
748 * fix(update): make setDefaultsOnInsert handle nested subdoc updates with deeply nested defaults #6665
749 * docs: use latest acquit-ignore to handle examples that start with acquit:ignore:start #6657
750 * fix(validation): format `properties.message` as well as `message` #6621
751
7525.2.1 / 2018-07-03
753==================
754 * fix(connection): allow setting the mongodb driver's useNewUrlParser option, default to false #6656 #6648 #6647
755 * fix(model): only warn on custom _id index if index only has _id key #6650
756
7575.2.0 / 2018-07-02
758==================
759 * feat(model): add `countDocuments()` #6643
760 * feat(model): make ensureIndexes() fail if specifying an index on _id #6605
761 * feat(mongoose): add `objectIdGetter` option to remove ObjectId.prototype._id #6588
762 * feat: upgrade mongodb -> 3.1.0 for full MongoDB 4.0 support #6579
763 * feat(query): support `runValidators` as a global option #6578
764 * perf(schema): use WeakMap instead of array for schema stack #6503
765 * feat(model): decorate unique discriminator indexes with partialFilterExpressions #6347
766 * feat(model): add `syncIndexes()`, drops indexes that aren't in schema #6281
767 * feat(document): add default getter/setter if virtual doesn't have one #6262
768 * feat(discriminator): support discriminators on nested doc arrays #6202
769 * feat(update): add `Query.prototype.set()` #5770
770
7715.1.8 / 2018-07-02
772==================
773 * fix: don't throw TypeError if calling save() after original save() failed with push() #6638 [evanhenke](https://github.com/evanhenke)
774 * fix(query): add explain() helper and don't hydrate explain output #6625
775 * docs(query): fix `setOptions()` lists #6624
776 * docs: add geojson docs #6607
777 * fix: bump mongodb -> 3.0.11 to avoid cyclic dependency error with retryWrites #6109
778
7795.1.7 / 2018-06-26
780==================
781 * docs: add npm badge to readme #6623 [VFedyk](https://github.com/VFedyk)
782 * fix(document): don't throw parallel save error if post save hooks in parallel #6614 #6611 [lineus](https://github.com/lineus)
783 * fix(populate): allow dynamic ref to handle >1 model getModelsMapForPopulate #6613 #6612 [jimmytsao](https://github.com/jimmytsao)
784 * fix(document): handle `push()` on triple nested document array #6602
785 * docs(validation): improve update validator doc headers #6577 [joeytwiddle](https://github.com/joeytwiddle)
786 * fix(document): handle document arrays in `modifiedPaths()` with includeChildren option #5904
787
7885.1.6 / 2018-06-19
789==================
790 * fix: upgrade mongodb -> 3.0.10
791 * docs(model+document): clarify that `save()` returns `undefined` if passed a callback #6604 [lineus](https://github.com/lineus)
792 * fix(schema): apply alias when adding fields with .add() #6593
793 * docs: add full list of guides and streamline nav #6592
794 * docs(model): add `projection` option to `findOneAndUpdate()` #6590 [lineus](https://github.com/lineus)
795 * docs: support @static JSDoc declaration #6584
796 * fix(query): use boolean casting logic for $exists #6581
797 * fix(query): cast all $text options to correct values #6581
798 * fix(model): add support synchronous pre hooks for `createModel` #6552 [profbiss](https://github.com/profbiss)
799 * docs: add note about the `applyPluginsToDiscriminators` option #4965
800
8015.1.5 / 2018-06-11
802==================
803 * docs(guide): rework query helper example #6575 [lineus](https://github.com/lineus)
804 * fix(populate): handle virtual populate with embedded discriminator under single nested subdoc #6571
805 * docs: add string option to projections that call query select #6563 [lineus](https://github.com/lineus)
806 * style: use ES6 in collection.js #6560 [l33ds](https://github.com/l33ds)
807 * fix(populate): add virtual ref function ability getModelsMapForPopulate #6559 #6554 [lineus](https://github.com/lineus)
808 * docs(queries): fix link #6557 [sun1x](https://github.com/sun1x)
809 * fix(schema): rename indexes -> getIndexes to avoid webpack duplicate declaration #6547
810 * fix(document): support `toString()` as custom method #6538
811 * docs: add @instance for instance methods to be more compliant with JSDoc #6516 [treble-snake](https://github.com/treble-snake)
812 * fix(populate): avoid converting to map when using mongoose-deep-populate #6460
813 * docs(browser): create new browser docs page #6061
814
8155.1.4 / 2018-06-04
816==================
817 * docs(faq): add hr tags for parallel save error #6550 [lineus](https://github.com/lineus)
818 * docs(connection): fix broken link #6545 [iblamefish](https://github.com/iblamefish)
819 * fix(populate): honor subpopulate options #6539 #6528 [lineus](https://github.com/lineus)
820 * fix(populate): allow population of refpath under array #6537 #6509 [lineus](https://github.com/lineus)
821 * fix(query): dont treat $set the same as the other ops in update casting #6535 [lineus](https://github.com/lineus)
822 * fix: bump async -> 2.6.1 #6534 #6505 [lineus](https://github.com/lineus)
823 * fix: support using a function as validation error message #6530 [lucandrade](https://github.com/lucandrade)
824 * fix(populate): propagate `lean()` down to subpopulate #6498 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
825 * docs(lambda): add info on what happens if database does down between lambda function calls #6409
826 * fix(update): allow updating embedded discriminator path if discriminator key is in filter #5841
827
8285.1.3 / 2018-05-28
829==================
830 * fix(document): support set() on path underneath array embedded discriminator #6526
831 * chore: update lodash and nsp dev dependencies #6514 [ChristianMurphy](https://github.com/ChristianMurphy)
832 * fix(document): throw readable error when saving the same doc instance more than once in parallel #6511 #6456 #4064 [lineus](https://github.com/lineus)
833 * fix(populate): set correct nestedSchemaPath for virtual underneath embedded discriminator #6501 #6487 [lineus](https://github.com/lineus)
834 * docs(query): add section on promises and warning about not mixing promises and callbacks #6495
835 * docs(connection): add concrete example of connecting to multiple hosts #6492 [lineus](https://github.com/lineus)
836 * fix(populate): handle virtual populate under single nested doc under embedded discriminator #6488
837 * fix(schema): collect indexes from embedded discriminators for autoIndex build #6485
838 * fix(document): handle `doc.set()` underneath embedded discriminator #6482
839 * fix(document): handle set() on path under embedded discriminator with object syntax #6482
840 * fix(document): handle setting nested property to object with only non-schema properties #6436
841
8424.13.14 / 2018-05-25
843====================
844 * fix(model): handle retainKeyOrder option in findOneAndUpdate() #6484
845
8465.1.2 / 2018-05-21
847==================
848 * docs(guide): add missing SchemaTypes #6490 [distancesprinter](https://github.com/distancesprinter)
849 * fix(map): make MongooseMap.toJSON return a serialized object #6486 #6478 [lineus](https://github.com/lineus)
850 * fix(query): make CustomQuery inherit from model.Query for hooks #6483 #6455 [lineus](https://github.com/lineus)
851 * fix(document): prevent default falses from being skipped by $__dirty #6481 #6477 [lineus](https://github.com/lineus)
852 * docs(connection): document `useDb()` #6480
853 * fix(model): skip redundant clone in insertMany #6479 [d1manson](https://github.com/d1manson)
854 * fix(aggregate): let replaceRoot accept objects as well as strings #6475 #6474 [lineus](https://github.com/lineus)
855 * docs(model): clarify `emit()` in mapReduce and how map/reduce are run #6465
856 * fix(populate): flatten array to handle multi-level nested `refPath` #6457
857 * fix(date): cast small numeric strings as years #6444 [AbdelrahmanHafez](https://github.com/AbdelrahmanHafez)
858 * fix(populate): remove unmatched ids when using virtual populate on already hydrated document #6435
859 * fix(array): use custom array class to avoid clobbered property names #6431
860 * fix(model): handle hooks for custom methods that return promises #6385
861
8624.13.13 / 2018-05-17
863====================
864 * fix(update): stop clobbering $in when casting update #6441 #6339
865 * fix: upgrade async -> 2.6.0 re: security warning
866
8675.1.1 / 2018-05-14
868==================
869 * docs(schema): add notes in api and guide about schema.methods object #6470 #6440 [lineus](https://github.com/lineus)
870 * fix(error): add modified paths to VersionError #6464 #6433 [paglias](https://github.com/paglias)
871 * fix(populate): only call populate with full param signature when match is not present #6458 #6451 [lineus](https://github.com/lineus)
872 * docs: fix geoNear link in migration guide #6450 [kawache](https://github.com/kawache)
873 * fix(discriminator): throw readable error when `create()` with a non-existent discriminator key #6434
874 * fix(populate): add `retainNullValues` option to avoid stripping out null keys #6432
875 * fix(populate): handle populate in embedded discriminators underneath nested paths #6411
876 * docs(model): add change streams and ToC, make terminology more consistent #5888
877
8785.1.0 / 2018-05-10
879==================
880 * feat(ObjectId): add `_id` getter so you can get a usable id whether or not the path is populated #6415 #6115
881 * feat(model): add Model.startSession() #6362
882 * feat(document): add doc.$session() and set session on doc after query #6362
883 * feat: add Map type that supports arbitrary keys #6287 #681
884 * feat: add `cloneSchemas` option to mongoose global to opt in to always cloning schemas before use #6274
885 * feat(model): add `findOneAndDelete()` and `findByIdAndDelete()` #6164
886 * feat(document): support `$ignore()` on single nested and array subdocs #6152
887 * feat(document): add warning about calling `save()` on subdocs #6152
888 * fix(model): make `save()` use `updateOne()` instead of `update()` #6031
889 * feat(error): add version number to VersionError #5966
890 * fix(query): allow `[]` as a value for `$in` when casting #5913
891 * fix(document): avoid running validators on single nested paths if only a child path is modified #5885
892 * feat(schema): print warning if method conflicts with mongoose internals #5860
893
8945.0.18 / 2018-05-09
895===================
896 * fix(update): stop clobbering $in when casting update #6441 #6339 [lineus](https://github.com/lineus)
897 * fix: upgrade mongodb driver -> 3.0.8 to fix session issue #6437 #6357 [simllll](https://github.com/simllll)
898 * fix: upgrade bson -> 1.0.5 re: https://snyk.io/vuln/npm:bson:20180225 #6423 [ChristianMurphy](https://github.com/ChristianMurphy)
899 * fix: look for `valueOf()` when casting to Decimal128 #6419 #6418 [lineus](https://github.com/lineus)
900 * fix: populate array of objects with space separated paths #6414 [lineus](https://github.com/lineus)
901 * test: add coverage for `mongoose.pluralize()` #6412 [FastDeath](https://github.com/FastDeath)
902 * fix(document): avoid running default functions on init() if path has value #6410
903 * fix(document): allow saving document with `null` id #6406
904 * fix: prevent casting of populated docs in document.init #6390 [lineus](https://github.com/lineus)
905 * fix: remove `toHexString()` helper that was added in 5.0.15 #6359
906
9075.0.17 / 2018-04-30
908===================
909 * docs(migration): certain chars in passwords may cause connection failures #6401 [markstos](https://github.com/markstos)
910 * fix(document): don't throw when `push()` on a nested doc array #6398
911 * fix(model): apply hooks to custom methods if specified #6385
912 * fix(schema): support opting out of one timestamp field but not the other for `insertMany()` #6381
913 * fix(documentarray): handle `required: true` within documentarray definition #6364
914 * fix(document): ensure `isNew` is set before default functions run on init #3793
915
9165.0.16 / 2018-04-23
917===================
918 * docs(api): sort api methods based on their string property #6374 [lineus](https://github.com/lineus)
919 * docs(connection): fix typo in `createCollection()` #6370 [mattc41190](https://github.com/mattc41190)
920 * docs(document): remove vestigial reference to `numAffected` #6367 [ekulabuhov](https://github.com/ekulabuhov)
921 * docs(schema): fix typo #6366 [dhritzkiv](https://github.com/dhritzkiv)
922 * docs(schematypes): add missing `minlength` and `maxlength` docs #6365 [treble-snake](https://github.com/treble-snake)
923 * docs(queries): fix formatting #6360 [treble-snake](https://github.com/treble-snake)
924 * docs(api): add cursors to API docs #6353 #6344 [lineus](https://github.com/lineus)
925 * docs(aggregate): remove reference to non-existent `.select()` method #6346
926 * fix(update): handle `required` array with update validators and $pull #6341
927 * fix(update): avoid setting __v in findOneAndUpdate if it is `$set` #5973
928
9295.0.15 / 2018-04-16
930===================
931 * fix: add ability for casting from number to decimal128 #6336 #6331 [lineus](https://github.com/lineus)
932 * docs(middleware): enumerate the ways to error out in a hook #6315
933 * fix(document): respect schema-level depopulate option for toObject() #6313
934 * fix: bump mongodb driver -> 3.0.6 #6310
935 * fix(number): check for `valueOf()` function to support Decimal.js #6306 #6299 [lineus](https://github.com/lineus)
936 * fix(query): run array setters on query if input value is an array #6277
937 * fix(versioning): don't require matching version when using array.pull() #6190
938 * fix(document): add `toHexString()` function so you don't need to check whether a path is populated to get an id #6115
939
9405.0.14 / 2018-04-09
941===================
942 * fix(schema): clone aliases and alternative option syntax correctly
943 * fix(query): call utils.toObject in query.count like in query.find #6325 [lineus](https://github.com/lineus)
944 * docs(populate): add middleware examples #6320 [BorntraegerMarc](https://github.com/BorntraegerMarc)
945 * docs(compatibility): fix dead link #6319 [lacivert](https://github.com/lacivert)
946 * docs(api): fix markdown parsing for parameters #6318 #6314 [lineus](https://github.com/lineus)
947 * fix(populate): handle space-delimited paths in array populate #6296 #6284 [lineus](https://github.com/lineus)
948 * fix(populate): support basic virtual populate underneath embedded discriminators #6273
949
9505.0.13 / 2018-04-05
951===================
952 * docs(faq): add middleware to faq arrow function warning #6309 [lineus](https://github.com/lineus)
953 * docs(schema): add example to loadClass() docs #6308
954 * docs: clean up misc typos #6304 [sfrieson](https://github.com/sfrieson)
955 * fix(document): apply virtuals when calling `toJSON()` on a nested path #6294
956 * refactor(connection): use `client.db()` syntax rather than double-parsing the URI #6292 #6286
957 * docs: document new behavior of required validator for arrays #6288 [daltones](https://github.com/daltones)
958 * fix(schema): treat set() options as user-provided options #6274
959 * fix(schema): clone discriminators correctly #6274
960 * fix(update): make setDefaultsOnInsert not create subdoc if only default is id #6269
961 * docs(discriminator): clarify 3rd argument to Model.discriminator() #2596
962
9635.0.12 / 2018-03-27
964===================
965 * docs(query): updating model name in query API docs #6280 [lineus](https://github.com/lineus)
966 * docs: fix typo in tests #6275 [styler](https://github.com/styler)
967 * fix: add missing `.hint()` to aggregate #6272 #6251 [lineus](https://github.com/lineus)
968 * docs(api): add headers to each API docs section for easer nav #6261
969 * fix(query): ensure hooked query functions always run on next tick for chaining #6250
970 * fix(populate): ensure populated array not set to null if it isn't set #6245
971 * fix(connection): set readyState to disconnected if initial connection fails #6244 #6131
972 * docs(model): make `create()` params show up correctly in docs #6242
973 * fix(model): make error handlers work with MongoDB server errors and `insertMany()` #6228
974 * fix(browser): ensure browser document builds defaults for embedded arrays correctly #6175
975 * fix(timestamps): set timestamps when using `updateOne()` and `updateMany()` #6282 [gualopezb](https://github.com/gualopezb)
976
9775.0.11 / 2018-03-19
978===================
979 * fix(update): handle $pull with $in in update validators #6240
980 * fix(query): don't convert undefined to null when casting so driver `ignoreUndefined` option works #6236
981 * docs(middleware): add example of using async/await with middleware #6235
982 * fix(populate): apply justOne option before `completeMany()` so it works with lean() #6234
983 * fix(query): ensure errors in user callbacks aren't caught in init #6195 #6178
984 * docs(connections): document dbName option for Atlas connections #6179
985 * fix(discriminator): make child schema nested paths overwrite parent schema paths #6076
986
9874.13.12 / 2018-03-13
988====================
989 * fix(document): make virtual get() return undefined instead of null if no getters #6223
990 * docs: fix url in useMongoClient error message #6219 #6217 [lineus](https://github.com/lineus)
991 * fix(discriminator): don't copy `discriminators` property from base schema #6122 #6064
992
9935.0.10 / 2018-03-12
994===================
995 * docs(schematype): add notes re: running setters on queries #6209
996 * docs: fix typo #6208 [kamagatos](https://github.com/kamagatos)
997 * fix(query): only call setters once on query filter props for findOneAndUpdate and findOneAndRemove #6203
998 * docs: elaborate on connection string changes in migration guide #6193
999 * fix(document): skip applyDefaults if subdoc is null #6187
1000 * docs: fix schematypes docs and link to them #6176
1001 * docs(faq): add FAQs re: array defaults and casting aggregation pipelines #6184 #6176 #6170 [lineus](https://github.com/lineus)
1002 * fix(document): ensure primitive defaults are set and built-in default functions run before setters #6155
1003 * fix(query): handle single embedded embedded discriminators in castForQuery #6027
1004
10055.0.9 / 2018-03-05
1006==================
1007 * perf: bump mongodb -> 3.0.4 to fix SSL perf issue #6065
1008
10095.0.8 / 2018-03-03
1010==================
1011 * docs: remove obsolete references to `emitIndexErrors` #6186 [isaackwan](https://github.com/isaackwan)
1012 * fix(query): don't cast findOne() until exec() so setters don't run twice #6157
1013 * fix: remove document_provider.web.js file #6186
1014 * fix(discriminator): support custom discriminator model names #6100 [wentout](https://github.com/wentout)
1015 * fix: support caching calls to `useDb()` #6036 [rocketspacer](https://github.com/rocketspacer)
1016 * fix(query): add omitUndefined option so setDefaultsOnInsert can kick in on undefined #6034
1017 * fix: upgrade mongodb -> 3.0.3 for reconnectTries: 0 blocking process exit fix #6028
1018
10195.0.7 / 2018-02-23
1020==================
1021 * fix: support eachAsync options with aggregation cursor #6169 #6168 [vichle](https://github.com/vichle)
1022 * docs: fix link to MongoDB compound indexes docs #6162 [br0p0p](https://github.com/br0p0p)
1023 * docs(aggregate): use eachAsync instead of incorrect `each()` #6160 [simllll](https://github.com/simllll)
1024 * chore: fix benchmarks #6158 [pradel](https://github.com/pradel)
1025 * docs: remove dead link to old blog post #6154 [markstos](https://github.com/markstos)
1026 * fix: don't convert dates to numbers when updating mixed path #6146 #6145 [s4rbagamble](https://github.com/s4rbagamble)
1027 * feat(aggregate): add replaceRoot, count, sortByCount helpers #6142 [jakesjews](https://github.com/jakesjews)
1028 * fix(document): add includedChildren flag to modifiedPaths() #6134
1029 * perf: don't create wrapper function if no hooks specified #6126
1030 * fix(schema): allow indexes on single nested subdocs for geoJSON #6113
1031 * fix(document): allow depopulating all fields #6073
1032 * feat(mongoose): add support for `useFindAndModify` option on singleton #5616
1033
10345.0.6 / 2018-02-15
1035==================
1036 * refactor(query.castUpdate): avoid creating error until necessary #6137
1037 * docs(api): fix missing api docs #6136 [lineus](https://github.com/lineus)
1038 * fix(schema): copy virtuals when using `clone()` #6133
1039 * fix(update): avoid digging into buffers with upsert and replaceOne #6124
1040 * fix(schema): support `enum` on arrays of strings #6102
1041 * fix(update): cast `$addToSet: [1, 2]` -> `$addToSet: { $each: [1, 2] }` #6086
1042
10435.0.5 / 2018-02-13
1044==================
1045 * docs: make > show up correctly in API docs #6114
1046 * fix(query): support `where()` overwriting primitive with object #6097
1047 * fix(schematype): don't run internal `resetId` setter on queries with _id #6093
1048 * fix(discriminator): don't copy `discriminators` property from base schema #6064
1049 * fix(utils): respect `valueOf()` when merging object for update #6059
1050 * docs(validation): fix typo 'maxLength' #4720
1051 * fix(document): apply defaults after setting initial value so default functions don't see empty doc #3781
1052
10535.0.4 / 2018-02-08
1054==================
1055 * docs: add lambda guide #6107
1056 * fix(connection): add `dbName` option to work around `mongodb+srv` not supporting db name in URI #6106
1057 * fix(schematype): fix regexp typo in ObjectId #6098 [JoshuaWise](https://github.com/JoshuaWise)
1058 * perf(document): re-use the modifiedPaths list #6092 [tarun1793](https://github.com/tarun1793)
1059 * fix: use console.info() instead of console.error() for debug output #6088 [yuristsepaniuk](https://github.com/yuristsepaniuk)
1060 * docs(validation): clean up runValidators and isAsync options docs for 5.x #6083
1061 * docs(model): use array instead of spread consistently for aggregate() #6070
1062 * fix(schema): make aliases handle mongoose-lean-virtuals #6069
1063 * docs(layout): add link to subdocs guide #6056
1064 * fix(query): make strictQuery: true strip out fields that aren't in the schema #6032
1065 * docs(guide): add notes for `strictQuery` option #6032
1066
10674.13.11 / 2018-02-07
1068====================
1069 * docs: fix links in 4.x docs #6081
1070 * chore: add release script that uses --tag for npm publish for 4.x releases #6063
1071
10725.0.3 / 2018-01-31
1073==================
1074 * fix: consistently use process.nextTick() to avoid sinon.useFakeTimers() causing ops to hang #6074
1075 * docs(aggregate): fix typo #6072 [adursun](https://github.com/adursun)
1076 * chore: add return type to `mongoose.model()` docs [bryant1410](https://github.com/bryant1410)
1077 * fix(document): depopulate push()-ed docs when saving #6048
1078 * fix: upgrade mongodb -> 3.0.2 #6019
1079
10805.0.2 / 2018-01-28
1081==================
1082 * fix(schema): do not overwrite default values in schema when nested timestamps are provided #6024 [cdeveas](https://github.com/cdeveas)
1083 * docs: fix syntax highlighting in models.jade, schematypes.jade, subdocs.jade #6058 [lineus](https://github.com/lineus)
1084 * fix: use lazy loading so we can build mongoose with webpack #5993 #5842
1085 * docs(connections): clarify multi-mongos with useMongoClient for 4.x docs #5984
1086 * fix(populate): handle populating embedded discriminator paths #5970
1087
10884.13.10 / 2018-01-28
1089====================
1090 * docs(model+query): add lean() option to Model helpers #5996 [aguyinmontreal](https://github.com/aguyinmontreal)
1091 * fix: use lazy loading so we can build mongoose with webpack #5993 #5842
1092 * docs(connections): clarify multi-mongos with useMongoClient for 4.x docs #5984
1093 * fix(populate): handle populating embedded discriminator paths #5970
1094 * docs(query+aggregate): add more detail re: maxTimeMS #4066
1095
10965.0.1 / 2018-01-19
1097==================
1098 * fix(document): make validate() not resolve to document #6014
1099 * fix(model): make save() not return DocumentNotFoundError if using fire-and-forget writes #6012
1100 * fix(aggregate): make options() work as advertised #6011 [spederiva](https://github.com/spederiva)
1101 * docs(queries): fix code samples #6008
1102
11035.0.0 / 2018-01-17
1104==================
1105 * test: refactor tests to use start fewer connections #5985 [fenanquin](https://github.com/fenanquin)
1106 * feat: add global bufferCommands option #5879
1107 * docs: new docs site and build system #5976
1108 * test: increase timeout on slow test cases #5968 [fenanquin](https://github.com/fenanquin)
1109 * fix: avoid casting out array filter elements #5965
1110 * feat: add Model.watch() wrapper #5964
1111 * chore: replace istanbul with nyc #5962 [ChristianMurphy](https://github.com/ChristianMurphy)
1112
11134.13.9 / 2018-01-07
1114===================
1115 * chore: update marked (dev dependency) re: security vulnerability #5951 [ChristianMurphy](https://github.com/ChristianMurphy)
1116 * fix: upgrade mongodb -> 2.2.34 for ipv6 and autoReconnect fixes #5794 #5760
1117 * docs: use useMongooseAggCursor for aggregate docs #2955
1118
11195.0.0-rc2 / 2018-01-04
1120======================
1121 * fix: add cleaner warning about no longer needing `useMongoClient` in 5.x #5961
1122 * chore: update acquit -> 0.5.1 for minor security patch #5961 [ChristianMurphy](https://github.com/ChristianMurphy)
1123 * docs: add docs for mongoose 4.x at http://mongoosejs.com/docs/4.x #5959
1124 * docs: add link to migration guide #5957
1125 * chore: update eslint to version 4.14.0 #5955 [ChristianMurphy](https://github.com/ChristianMurphy)
1126 * chore: update mocha to version 4.1.0 [ChristianMurphy](https://github.com/ChristianMurphy)
1127
11285.0.0-rc1 / 2018-01-02
1129======================
1130 * fix(index): use pluralize correctly for `mongoose.model()` #5958
1131 * fix: make mquery use native promises by default #5945
1132 * fix(connection): ensure 'joined' and 'left' events get bubbled up #5944
1133
11345.0.0-rc0 / 2017-12-28
1135======================
1136 * BREAKING CHANGE: always use mongoose aggregation cursor when using `.aggregate().cursor()` #5941
1137 * BREAKING CHANGE: attach query middleware when compiling model #5939
1138 * BREAKING CHANGE: `emitIndexErrors` is on by default, failing index build will throw uncaught error if not handled #5910
1139 * BREAKING CHANGE: remove precompiled browser bundle #5895
1140 * feat: add `mongoose.pluralize()` function #5877
1141 * BREAKING CHANGE: remove `passRawResult` option for `findOneAndUpdate`, use `rawResult` #5869
1142 * BREAKING CHANGE: implicit async validators (based on number of function args) are removed, return a promise instead #5824
1143 * BREAKING CHANGE: fail fast if user sets a unique index on `_id` #5820 [varunjayaraman](https://github.com/varunjayaraman)
1144 * BREAKING CHANGE: mapReduce resolves to an object with 2 keys rather than 2 separate args #5816
1145 * BREAKING CHANGE: `mongoose.connect()` returns a promise, removed MongooseThenable #5796
1146 * BREAKING CHANGE: query stream removed, use `cursor()` instead #5795
1147 * BREAKING CHANGE: connection `open()` and `openSet()` removed, use `openUri()` instead #5795
1148 * BREAKING CHANGE: use MongoDB driver 3.0.0, drop support for MongoDB server < 3.0.0 #5791 #4740
1149 * BREAKING CHANGE: remove support for `$pushAll`, remove `usePushEach` option #5670
1150 * BREAKING CHANGE: make date casting use native Date #5395 [varunjayaraman](https://github.com/varunjayaraman)
1151 * BREAKING CHANGE: remove `runSettersOnQuery`, always run setters on query #5340
1152 * BREAKING CHANGE: array of length 0 now satisfies `required: true` for arays #5139 [wlingke](https://github.com/wlingke)
1153 * BREAKING CHANGE: remove `saveErrorIfNotFound`, always error out if `save()` did not update a document #4973
1154 * BREAKING CHANGE: don't execute getters in reverse order #4835
1155 * BREAKING CHANGE: make boolean casting more strict #4245
1156 * BREAKING CHANGE: `toObject()` and `toJSON()` option parameter merges with defaults rather than overwriting #4131
1157 * feat: allow setting `default` on `_id` #4069
1158 * BREAKING CHANGE: `deleteX()` and `remove()` promise resolves to the write object result #4013
1159 * feat: support returning a promise from middleware functions #3779
1160 * BREAKING CHANGE: don't return a promise if callback specified #3670
1161 * BREAKING CHANGE: only cast `update()`, `updateX()`, `replaceOne()`, `remove()`, `deleteX()` in exec #3529
1162 * BREAKING CHANGE: sync errors in middleware functions are now handled #3483
1163 * BREAKING CHANGE: post hooks get flow control #3232
1164 * BREAKING CHANGE: deduplicate hooks when merging discriminator schema #2945
1165 * BREAKING CHANGE: use native promises by default, remove support for mpromise #2917
1166 * BREAKING CHANGE: remove `retainKeyOrder`, always use forward order when iterating through objects #2749
1167 * BREAKING CHANGE: `aggregate()` no longer accepts a spread #2716
1168
11694.13.8 / 2017-12-27
1170===================
1171 * docs(guide): use more up-to-date syntax for autoIndex example #5933
1172 * docs: fix grammar #5927 [abagh0703](https://github.com/abagh0703)
1173 * fix: propagate lean options to child schemas #5914
1174 * fix(populate): use correct model with discriminators + nested populate #5858
1175
11764.13.7 / 2017-12-11
1177===================
1178 * docs(schematypes): fix typo #5889 [gokaygurcan](https://github.com/gokaygurcan)
1179 * fix(cursor): handle `reject(null)` with eachAsync callback #5875 #5874 [ZacharyRSmith](https://github.com/ZacharyRSmith)
1180 * fix: disallow setting `mongoose.connection` to invalid values #5871 [jinasonlin](https://github.com/jinasonlin)
1181 * docs(middleware): suggest using `return next()` to stop middleware execution #5866
1182 * docs(connection): improve connection string query param docs #5864
1183 * fix(document): run validate hooks on array subdocs even if not directly modified #5861
1184 * fix(discriminator): don't treat $meta as defining projection when querying #5859
1185 * fix(types): handle Decimal128 when using bson-ext on server side #5850
1186 * fix(document): ensure projection with only $slice isn't treated as inclusive for discriminators #4991
1187 * fix(model): throw error when passing non-object to create() #2037
1188
11894.13.6 / 2017-12-02
1190===================
1191 * fix(schema): support strictBool option in schema #5856 [ekulabuhov](https://github.com/ekulabuhov)
1192 * fix(update): make upsert option consistently handle truthy values, not just booleans, for updateOne() #5839
1193 * refactor: remove unnecessary constructor check #2057
1194 * docs(query): correct function signature for .mod() helper #1806
1195 * fix(query): report ObjectParameterError when passing non-object as filter to find() and findOne() #1698
1196
11974.13.5 / 2017-11-24
1198===================
1199 * fix(model): handle update cast errors correctly with bulkWrite #5845 [Michael77](https://github.com/Michael77)
1200 * docs: add link to bufferCommands option #5844 [ralphite](https://github.com/ralphite)
1201 * fix(model): allow virtual ref function to return arrays #5834 [brunohcastro](https://github.com/brunohcastro)
1202 * fix(query): don't throw uncaught error if query filter too big #5812
1203 * fix(document): if setting unselected nested path, don't overwrite nested path #5800
1204 * fix(document): support calling `populate()` on nested document props #5703
1205 * fix: add `strictBool` option for schema type boolean #5344 #5211 #4245
1206 * docs(faq): add faq re: typeKey #1886
1207 * docs(query): add more detailed docs re: options #1702
1208
12094.13.4 / 2017-11-17
1210===================
1211 * fix(aggregate): add chainable .option() helper for setting arbitrary options #5829
1212 * fix(aggregate): add `.pipeline()` helper to get the current pipeline #5825
1213 * docs: grammar fixes for `unique` FAQ #5823 [mfluehr](https://github.com/mfluehr)
1214 * chore: add node 9 to travis #5822 [superheri](https://github.com/superheri)
1215 * fix(model): fix infinite recursion with recursive embedded discriminators #5821 [Faibk](https://github.com/Faibk)
1216
12174.13.3 / 2017-11-15
1218===================
1219 * chore: add node 8 to travis #5818 [superheri](https://github.com/superheri)
1220 * fix(document): don't apply transforms to nested docs when updating already saved doc #5807
1221
12224.13.2 / 2017-11-11
1223===================
1224 * feat(buffer): add support for subtype prop #5530
1225
12264.13.1 / 2017-11-08
1227===================
1228 * fix: accept multiple paths or array of paths to depopulate #5798 #5797 [adamreisnz](https://github.com/adamreisnz)
1229 * fix(document): pass default array as actual array rather than taking first element #5780
1230 * fix(model): increment version when $set-ing it in a save() that requires a version bump #5779
1231 * fix(query): don't explicitly project in discriminator key if user projected in parent path #5775 #5754
1232 * fix(model): cast query option to geoNear() #5765
1233 * fix(query): don't treat projection with just $slice as inclusive #5737
1234 * fix(discriminator): defer applying embedded discriminator hooks until top-level model is compiled #5706
1235 * docs(discriminator): add warning to always attach hooks before calling discriminator() #5706
1236
12374.13.0 / 2017-11-02
1238===================
1239 * feat(aggregate): add $addFields helper #5740 [AyushG3112](https://github.com/AyushG3112)
1240 * feat(connection): add connection-level bufferCommands #5720
1241 * feat(connection): add createCollection() helper #5712
1242 * feat(populate): support setting localField and foreignField to functions #5704 #5602
1243 * feat(query): add multipleCastError option for aggregating cast errors when casting update #5609
1244 * feat(populate): allow passing a function to virtual ref #5602
1245 * feat(schema): add excludeIndexes option to optionally prevent collecting indexes from nested schemas #5575
1246 * feat(model): report validation errors from `insertMany()` if using `ordered: false` and `rawResult: true` #5337
1247 * feat(aggregate): add pre/post aggregate middleware #5251
1248 * feat(schema): allow using `set` as a schema path #1939
1249
12504.12.6 / 2017-11-01
1251===================
1252 * fix(schema): make clone() copy query helpers correctly #5752
1253 * fix: undeprecate `ensureIndex()` and use it by default #3280
1254
12554.12.5 / 2017-10-29
1256===================
1257 * fix(query): correctly handle `$in` and required for $pull and update validators #5744
1258 * feat(aggegate): add $addFields pipeline operator #5740 [AyushG3112](https://github.com/AyushG3112)
1259 * fix(document): catch sync errors in document pre hooks and report as error #5738
1260 * fix(populate): handle slice projections correctly when automatically selecting populated fields #5737
1261 * fix(discriminator): fix hooks for embedded discriminators #5706 [wlingke](https://github.com/wlingke)
1262 * fix(model): throw sane error when customer calls `mongoose.Model()` over `mongoose.model()` #2005
1263
12644.12.4 / 2017-10-21
1265===================
1266 * test(plugins): add coverage for idGetter with id as a schema property #5713 [wlingke](https://github.com/wlingke)
1267 * fix(model): avoid copying recursive $$context object when creating discriminator after querying #5721
1268 * fix(connection): ensure connection promise helpers are removed before emitting 'connected' #5714
1269 * docs(schema): add notes about runSettersOnQuery to schema setters #5705
1270 * fix(collection): ensure queued operations run on the next tick #5562
1271
12724.12.3 / 2017-10-16
1273===================
1274 * fix(connection): emit 'reconnect' event as well as 'reconnected' for consistency with driver #5719
1275 * fix: correctly bubble up left/joined events for replica set #5718
1276 * fix(connection): allow passing in `autoIndex` as top-level option rather than requiring `config.autoIndex` #5711
1277 * docs(connection): improve docs regarding reconnectTries, autoReconnect, and bufferMaxEntries #5711
1278 * fix(query): handle null with addToSet/push/pull/pullAll update validators #5710
1279 * fix(model): handle setDefaultsOnInsert option for bulkWrite updateOne and updateMany #5708
1280 * fix(query): avoid infinite recursion edge case when cloning a buffer #5702
1281
12824.12.2 / 2017-10-14
1283===================
1284 * docs(faq): add FAQ about using arrow functions for getters/setters, virtuals, and methods #5700
1285 * docs(schema): document the childSchemas property and add to public API #5695
1286 * fix(query): don't project in populated field if parent field is already projected in #5669
1287 * fix: bump mongodb -> 2.2.33 for issue with autoReconnect #4513
1288
12894.12.1 / 2017-10-08
1290===================
1291 * fix(document): create new doc when setting single nested, no more set() on copy of priorVal #5693
1292 * fix(model): recursively call applyMethods on child schemas for global plugins #5690
1293 * docs: fix bad promise lib example on home page #5686
1294 * fix(query): handle false when checking for inclusive/exclusive projection #5685
1295 * fix(discriminator): allow reusing child schema #5684
1296 * fix: make addToSet() on empty array with subdoc trigger manual population #5504
1297
12984.12.0 / 2017-10-02
1299===================
1300 * docs(validation): add docs coverage for ValidatorError.reason #5681
1301 * feat(discriminator): always add discriminatorKey to base schema to allow updating #5613
1302 * fix(document): make nested docs no longer inherit parent doc's schema props #5586 #5546 #5470
1303 * feat(query): run update validators on $pull and $pullAll #5555
1304 * feat(query): add .error() helper to query to error out in pre hooks #5520
1305 * feat(connection): add dropCollection() helper #5393
1306 * feat(schema): add schema-level collation option #5295
1307 * feat(types): add `discriminator()` function for single nested subdocs #5244
1308 * feat(document): add $isDeleted() getter/setter for better support for soft deletes #4428
1309 * feat(connection): bubble up reconnectFailed event when driver gives up reconnecting #4027
1310 * fix(query): report error if passing array or other non-object as filter to update query #3677
1311 * fix(collection): use createIndex() instead of deprecated ensureIndex() #3280
1312
13134.11.14 / 2017-09-30
1314====================
1315 * chore: add nsp check to the CI build #5679 [hairyhenderson](https://github.com/hairyhenderson)
1316 * fix: bump mquery because of security issue with debug package #5677 #5675 [jonathanprl](https://github.com/jonathanprl)
1317 * fix(populate): automatically select() populated()-ed fields #5669
1318 * fix(connection): make force close work as expected #5664
1319 * fix(document): treat $elemMatch as inclusive projection #5661
1320 * docs(model/query): clarify which functions fire which middleware #5654
1321 * fix(model): make `init()` public and return a promise that resolves when indexes are done building #5563
1322
13234.11.13 / 2017-09-24
1324====================
1325 * fix(query): correctly run replaceOne with update validators #5665 [sime1](https://github.com/sime1)
1326 * fix(schema): replace mistype in setupTimestamp method #5656 [zipp3r](https://github.com/zipp3r)
1327 * fix(query): avoid throwing cast error for strict: throw with nested id in query #5640
1328 * fix(model): ensure class gets combined schema when using class syntax with discriminators #5635
1329 * fix(document): handle setting doc array to array of top-level docs #5632
1330 * fix(model): handle casting findOneAndUpdate() with overwrite and upsert #5631
1331 * fix(update): correctly handle $ in updates #5628
1332 * fix(types): handle manual population consistently for unshift() and splice() #5504
1333
13344.11.12 / 2017-09-18
1335====================
1336 * docs(model): asterisk should not render as markdown bullet #5644 [timkinnane](https://github.com/timkinnane)
1337 * docs: use useMongoClient in connection example #5627 [GabrielNicolasAvellaneda](https://github.com/GabrielNicolasAvellaneda)
1338 * fix(connection): call callback when initial connection failed #5626
1339 * fix(query): apply select correctly if a given nested schema is used for 2 different paths #5603
1340 * fix(document): add graceful fallback for setting a doc array value and `pull()`-ing a doc #3511
1341
13424.11.11 / 2017-09-10
1343====================
1344 * fix(connection): properly set readyState in response to driver 'close' and 'reconnect' events #5604
1345 * fix(document): ensure single embedded doc setters only get called once, with correct value #5601
1346 * fix(timestamps): allow enabling updatedAt without createdAt #5598
1347 * test: improve unique validator test by making create run before ensureIndex #5595 #5562
1348 * fix(query): ensure find callback only gets called once when post init hook throws error #5592
1349
13504.11.10 / 2017-09-03
1351====================
1352 * docs: add KeenIO tracking #5612
1353 * fix(schema): ensure validators declared with `.validate()` get copied with clone() #5607
1354 * fix: remove unnecessary jest warning #5480
1355 * fix(discriminator): prevent implicit discriminator schema id from clobbering base schema custom id #5591
1356 * fix(schema): hide schema objectid warning for non-hex strings of length 24 #5587
1357 * docs(populate): use story schema defined key author instead of creator #5578 [dmric](https://github.com/dmric)
1358 * docs(document): describe usage of `.set()` #5576
1359 * fix(document): ensure correct scope in single nested validators #5569
1360 * fix(populate): don't mark path as populated until populate() is done #5564
1361 * fix(document): make push()-ing a doc onto an empty array act as manual population #5504
1362 * fix(connection): emit timeout event on socket timeout #4513
1363
13644.11.9 / 2017-08-27
1365===================
1366 * fix(error): avoid using arguments.callee because that breaks strict mode #5572
1367 * docs(schematypes): fix spacing #5567
1368 * fix(query): enforce binary subtype always propagates to mongodb #5551
1369 * fix(query): only skip castForQuery for mongoose arrays #5536
1370 * fix(browser): rely on browser entrypoint to decide whether to use BrowserDocument or NodeDocument #5480
1371
13724.11.8 / 2017-08-23
1373===================
1374 * feat: add warning about using schema ObjectId as type ObjectId #5571 [efkan](https://github.com/efkan)
1375 * fix(schema): allow setting `id` property after schema was created #5570 #5548
1376 * docs(populate): remove confusing _ from populate docs #5560
1377 * fix(connection): expose parsed uri fields (host, port, dbname) when using openUri() #5556
1378 * docs: added type boolean to options documentation #5547 [ndabAP](https://github.com/ndabAP)
1379 * test: add test coverage for stopping/starting server #5524
1380 * fix(aggregate): pull read preference from schema by default #5522
1381
13824.11.7 / 2017-08-14
1383===================
1384 * fix: correct properties when calling toJSON() on populated virtual #5544 #5442 [davidwu226](https://github.com/davidwu226)
1385 * docs: fix spelling #5535 [et](https://github.com/et)
1386 * fix(error): always set name before stack #5533
1387 * fix: add warning about running jest in jsdom environment #5532 #5513 #4943
1388 * fix(document): ensure overwriting a doc array cleans out individual docs #5523
1389 * fix(schema): handle creating arrays of single nested using type key #5521
1390 * fix: upgrade mongodb -> 2.2.31 to support user/pass options #5419
1391
13924.11.6 / 2017-08-07
1393===================
1394 * fix: limiting number of async operations per time in insertMany #5529 [andresattler](https://github.com/andresattler)
1395 * fix: upgrade mongodb -> 2.2.30 #5517
1396 * fix(browserDocument): prevent stack overflow caused by double-wrapping embedded doc save() in jest #5513
1397 * fix(document): clear single nested doc when setting to empty object #5506
1398 * fix(connection): emit reconnected and disconnected events correctly with useMongoClient #5498
1399 * fix(populate): ensure nested virtual populate gets set even if top-level property is null #5431
1400
14014.11.5 / 2017-07-30
1402===================
1403 * docs: fix link to $lookup #5516 [TalhaAwan](https://github.com/TalhaAwan)
1404 * fix: better parallelization for eachAsync #5502 [lchenay](https://github.com/lchenay)
1405 * docs(document): copy docs for save from model to doc #5493
1406 * fix(document): handle dotted virtuals in toJSON output #5473
1407 * fix(populate): restore user-provided limit after mutating so cursor() works with populate limit #5468
1408 * fix(query): don't throw StrictModeError if geo query with upsert #5467
1409 * fix(populate): propagate readPreference from query to populate queries by default #5460
1410 * docs: warn not to use arrow functions for statics and methods #5458
1411 * fix(query): iterate over all condition keys for setDefaultsOnInsert #5455
1412 * docs(connection): clarify server/replset/mongos option deprecation with useMongoClient #5442
1413
14144.11.4 / 2017-07-23
1415===================
1416 * fix: handle next() errors in `eachAsync()` #5486 [lchenay](https://github.com/lchenay)
1417 * fix(schema): propagate runSettersOnQuery option to implicitly created schemas #5479 [https://github.com/ValYouW]
1418 * fix(query): run castConditions() correctly in update ops #5477
1419 * fix(query): ensure castConditions called for findOne and findOneAnd* #5477
1420 * docs: clarify relationship between $lookup and populate #5475 [TalhaAwan](https://github.com/TalhaAwan)
1421 * test: add coverage for arrays of arrays [zbjornson](https://github.com/zbjornson)
1422 * fix(middleware): ensure that error handlers for save get doc as 2nd param #5466
1423 * fix: handle strict: false correctly #5454 #5453 [wookieb](https://github.com/wookieb)
1424 * fix(query): apply schema excluded paths if only projection is a $slice #5450
1425 * fix(query): correct discriminator handling for schema `select: false` fields in schema #5448
1426 * fix(cursor): call next() in series when parallel option used #5446
1427 * chore: load bundled driver first to avoid packaging problem #5443 [prototypeme](https://github.com/prototypeme)
1428 * fix(query): defer condition casting until final exec #5434
1429 * fix(aggregate): don't rely on mongodb aggregate to put a cursor in the callback #5394
1430 * docs(aggregate): add useMongooseAggCursor docs #5394
1431 * docs(middleware): clarify context for document, query, and model middleware #5381
1432
14334.11.3 / 2017-07-14
1434===================
1435 * fix(connection): remove .then() before resolving to prevent infinite recursion #5471
1436
14374.11.2 / 2017-07-13
1438===================
1439 * docs: fix comment typo in connect example #5435 [ConnorMcF](https://github.com/ConnorMcF)
1440 * fix(update): correctly cast document array in update validators with exec() #5430
1441 * fix(connection): handle autoIndex with useMongoClient #5423
1442 * fix(schema): handle `type: [Array]` in schemas #5416
1443 * fix(timestamps): if overwrite is set and there's a $set, use $set instead of top-level update #5413
1444 * fix(document): don't double-validate deeply nested doc array elements #5411
1445 * fix(schematype): clone default objects so default not shared across object instances unless `shared` specified #5407
1446 * fix(document): reset down the nested subdocs when resetting parent doc #5406
1447 * fix: don't pass error arg twice to error handlers #5405
1448 * fix(connection): make openUri() return connection decorated with then() and catch() #5404
1449 * fix: enforce $set on an array must be an array #5403
1450 * fix(document): don't crash if calling `validateSync()` after overwriting doc array index #5389
1451 * fix(discriminator): ensure discriminator key doesn't count as user-selected field for projection #4629
1452
14534.11.1 / 2017-07-02
1454===================
1455* docs: populate virtuals fix justOne description #5427 [fredericosilva](https://github.com/fredericosilva)
1456 * fix(connection): make sure to call onOpen in openUri() #5404
1457 * docs(query): justOne is actually single, and it default to false #5402 [zbjornson](https://github.com/zbjornson)
1458 * docs: fix small typo in lib/schema.js #5398 #5396 [pjo336](https://github.com/pjo336)
1459 * fix: emit remove on single nested subdocs when removing parent #5388
1460 * fix(update): handle update with defaults and overwrite but no update validators #5384
1461 * fix(populate): handle undefined refPath values in middle of array #5377
1462 * fix(document): ensure consistent setter context for single nested #5363
1463 * fix(query): support runSettersOnQuery as query option #5350
1464
14654.11.0 / 2017-06-25
1466===================
1467 * feat(query): execute setters with query as context for `runSettersOnQuery` #5339
1468 * feat(model): add translateAliases function #5338 [rocketspacer](https://github.com/rocketspacer)
1469 * feat(connection): add `useMongoClient` and `openUri` functions, deprecate current connect logic #5304
1470 * refactor(schema): make id virtual not access doc internals #5279
1471 * refactor: handle non-boolean lean #5279
1472 * feat(cursor): add addCursorFlag() support to query and agg cursors #4814
1473 * feat(cursor): add parallel option to eachAsync #4244
1474 * feat(schema): allow setting custom error constructor for custom validators #4009
1475
14764.10.8 / 2017-06-21
1477===================
1478 * docs: fix small formatting typo on schematypes #5374 [gianpaj](https://github.com/gianpaj)
1479 * fix(model): allow null as an _id #5370
1480 * fix(populate): don't throw async uncaught exception if model not found in populate #5364
1481 * fix: correctly cast decimals in update #5361
1482 * fix(error): don't use custom getter for ValidationError message #5359
1483 * fix(query): handle runSettersOnQuery in built-in _id setter #5351
1484 * fix(document): ensure consistent context for nested doc custom validators #5347
1485
14864.10.7 / 2017-06-18
1487===================
1488 * docs(validation): show overriding custom validator error with 2nd cb arg #5358
1489 * fix: `parseOption` mutates user passed option map #5357 [igwejk](https://github.com/igwejk)
1490 * docs: fix guide.jade typo #5356 [CalebAnderson2014](https://github.com/CalebAnderson2014)
1491 * fix(populate): don't set populate virtual to ids when match fails #5336
1492 * fix(query): callback with cast error if remove and delete* args have a cast error #5323
1493
14944.10.6 / 2017-06-12
1495===================
1496 * fix(cursor): handle custom model option for populate #5334
1497 * fix(populate): handle empty virtual populate with Model.populate #5331
1498 * fix(model): make ensureIndexes() run with autoIndex: false unless called internally #5328 #5324 #5317
1499 * fix: wait for all connections to close before resolving disconnect() promise #5316
1500 * fix(document): handle setting populated path with custom typeKey in schema #5313
1501 * fix(error): add toJSON helper to ValidationError so `message` shows up with JSON.stringify #5309
1502 * feat: add `getPromiseConstructor()` to prevent need for `mongoose.Promise.ES6` #5305
1503 * fix(document): handle conditional required with undefined props #5296
1504 * fix(model): clone options before inserting in save() #5294
1505 * docs(populate): clarify that multiple populate() calls on same path overwrite #5274
1506
15074.10.5 / 2017-06-06
1508===================
1509 * chore: improve contrib guide for building docs #5312
1510 * fix(populate): handle init-ing nested virtuals properly #5311
1511 * fix(update): report update validator error if required path under single nested doc not set
1512 * fix(schema): remove default validate pre hook that was causing issues with jest #4943
1513
15144.10.4 / 2017-05-29
1515===================
1516 * chore: dont store test data in same directory #5303
1517 * chore: add data dirs to npmignore #5301 [Starfox64](https://github.com/Starfox64)
1518 * docs(query): add docs about runSettersOnQuery #5300
1519
15204.10.3 / 2017-05-27
1521===================
1522 * docs: correct inconsistent references to updateOne and replaceOne #5297 [dhritzkiv](https://github.com/dhritzkiv)
1523 * docs: fix dropdowns in docs #5292 [nathanallen](https://github.com/nathanallen)
1524 * docs: add description of alias option #5287
1525 * fix(document): prevent infinite loop if validating nested array #5282
1526 * fix(schema): correctly handle ref ObjectIds from different mongoose libs #5259
1527 * fix(schema): load child class methods after base class methods to allow override #5227
1528
15294.10.2 / 2017-05-22
1530===================
1531 * fix: bump ms -> 2.0.0 and mquery -> 2.3.1 for minor security vulnerability #5275
1532
15334.10.1 / 2017-05-21
1534===================
1535 * fix(aggregate): handle sorting by text score correctly #5258
1536 * fix(populate): handle doc.populate() with virtuals #5240
1537 * fix(schema): enforce that `_id` is never null #5236
1538
15394.10.0 / 2017-05-18
1540===================
1541 * fix(schema): update clone method to include indexes #5268 [clozanosanchez](https://github.com/clozanosanchez)
1542 * feat(schema): support aliases #5184 [rocketspacer](https://github.com/rocketspacer)
1543 * feat(aggregate): add mongoose-specific aggregation cursor option #5145
1544 * refactor(model): make sharding into a plugin instead of core #5105
1545 * fix(document): make nested doc mongoose internals not enumerable again #5078
1546 * feat(model): pass params to pre hooks #5064
1547 * feat(timestamps): support already defined timestamp paths in schema #4868
1548 * feat(query): add runSettersOnQuery option #4569
1549 * fix(query): add strictQuery option that throws when not querying on field not in schema #4136
1550 * fix(update): more complete handling for overwrite option with update validators #3556
1551 * feat: support `unique: true` in arrays via the mongoose-unique-array plugin #3347
1552 * fix(model): always emit 'index', even if no indexes #3347
1553 * fix(schema): set unique indexes on primitive arrays #3347
1554 * feat(validation): include failed paths in error message and inspect output #3064 #2135
1555 * fix(model): return saved docs when create() fails #2190
1556
15574.9.10 / 2017-05-17
1558===================
1559 * fix(connection): ensure callback arg to openSet() is handled properly #5249
1560 * docs: remove dead plugins repo and add content links #5247
1561 * fix(model): skip index build if connecting after model init and autoIndex false #5176
1562
15634.9.9 / 2017-05-13
1564==================
1565 * docs: correct value for Query#regex() #5230
1566 * fix(connection): don't throw if .catch() on open() promise #5229
1567 * fix(schema): allow update with $currentDate for updatedAt to succeed #5222
1568 * fix(model): versioning doesn't fail if version key undefined #5221 [basileos](https://github.com/basileos)
1569 * fix(document): don't emit model error if callback specified for consistency with docs #5216
1570 * fix(document): handle errors in subdoc pre validate #5215
1571
15724.9.8 / 2017-05-07
1573==================
1574 * docs(subdocs): rewrite subdocs guide #5217
1575 * fix(document): avoid circular JSON if error in doc array under single nested subdoc #5208
1576 * fix(document): set intermediate empty objects for deeply nested undefined paths before path itself #5206
1577 * fix(schema): throw error if first param to schema.plugin() is not a function #5201
1578 * perf(document): major speedup in validating subdocs (50x in some cases) #5191
1579
15804.9.7 / 2017-04-30
1581==================
1582 * docs: fix typo #5204 [phutchins](https://github.com/phutchins)
1583 * fix(schema): ensure correct path for deeply nested schema indexes #5199
1584 * fix(schema): make remove a reserved name #5197
1585 * fix(model): handle Decimal type in insertMany correctly #5190
1586 * fix: upgrade kareem to handle async pre hooks correctly #5188
1587 * docs: add details about unique not being a validator #5179
1588 * fix(validation): handle returning a promise with isAsync: true #5171
1589
15904.9.6 / 2017-04-23
1591==================
1592 * fix: update `parentArray` references when directly assigning document arrays #5192 [jhob](https://github.com/jhob)
1593 * docs: improve schematype validator docs #5178 [milesbarr](https://github.com/milesbarr)
1594 * fix(model): modify discriminator() class in place #5175
1595 * fix(model): handle bulkWrite updateMany casting #5172 [tzellman](https://github.com/tzellman)
1596 * docs(model): fix replaceOne example for bulkWrite #5168
1597 * fix(document): don't create a new array subdoc when creating schema array #5162
1598 * fix(model): merge query hooks from discriminators #5147
1599 * fix(document): add parent() function to subdocument to match array subdoc #5134
1600
16014.9.5 / 2017-04-16
1602==================
1603 * fix(query): correct $pullAll casting of null #5164 [Sebmaster](https://github.com/Sebmaster)
1604 * docs: add advanced schemas docs for loadClass #5157
1605 * fix(document): handle null/undefined gracefully in applyGetters() #5143
1606 * fix(model): add resolveToObject option for mapReduce with ES6 promises #4945
1607
16084.9.4 / 2017-04-09
1609==================
1610 * fix(schema): clone query middleware correctly #5153 #5141 [clozanosanchez](https://github.com/clozanosanchez)
1611 * docs(aggregate): fix typo #5142
1612 * fix(query): cast .$ update to underlying array type #5130
1613 * fix(populate): don't mutate populate result in place #5128
1614 * fix(query): handle $setOnInsert consistent with $set #5126
1615 * docs(query): add strict mode option for findOneAndUpdate #5108
1616
16174.9.3 / 2017-04-02
1618==================
1619 * docs: document.js fixes for functions prepended with `$` #5131 [krmannix](https://github.com/krmannix)
1620 * fix: Avoid exception on constructor check #5129 [monkbroc](https://github.com/monkbroc)
1621 * docs(schematype): explain how to use `isAsync` with validate() #5125
1622 * docs(schematype): explain custom message with required function #5123
1623 * fix(populate): only apply refPath duplicate id optimization if not array #5114
1624 * fix(document): copy non-objects to doc when init() #5111
1625 * perf(populate): dont clone whole options every time #5103
1626 * feat(document): add isDirectSelected() to minimize isSelected() changes #5063
1627 * docs(schematypes): explain some subtleties with arrays #5059
1628
16294.9.2 / 2017-03-26
1630==================
1631 * fix(discriminator): handle class names consistently #5104
1632 * fix(schema): make clone() work with reusing discriminator schemas #5098
1633 * fix(querycursor): run pre find hooks with .cursor() #5096
1634 * fix(connection): throw error if username:password includes @ or : #5091
1635 * fix(timestamps): handle overwriting createdAt+updatedAt consistently #5088
1636 * fix(document): ensure subdoc post save runs after parent save #5085
1637 * docs(model): improve update docs #5076 [bertolo1988](https://github.com/bertolo1988)
1638
16394.9.1 / 2017-03-19
1640==================
1641 * fix(query): handle $type for arrays #5080 #5079 [zoellner](https://github.com/zoellner)
1642 * fix(model): handle ordered param for `insertMany` validation errors #5072 [sjorssnoeren](https://github.com/sjorssnoeren)
1643 * fix(populate): avoid duplicate ids in dynref queries #5054
1644 * fix(timestamps): dont set timestamps in update if user set it #5045
1645 * fix(update): dont double-call setters on arrays #5041
1646 * fix: upgrade driver -> 2.2.25 for jest fix #5033
1647 * fix(model): get promise each time save() is called rather than once #5030
1648 * fix(connection): make connect return value consistent #5006
1649
16504.9.0 / 2017-03-13
1651==================
1652 * feat(document): return this from `depopulate()` #5027
1653 * fix(drivers): stop emitting timeouts as errors #5026
1654 * feat(schema): add a clone() function for schemas #4983
1655 * feat(query): add rawResult option to replace passRawResult, deprecate passRawResult #4977 #4925
1656 * feat(schematype): support isAsync validator option and handle returning promises from validators, deprecate implicit async validators #4290
1657 * feat(query): add `replaceOne()`, `deleteOne()`, `deleteMany()` #3998
1658 * feat(model): add `bulkWrite()` #3998
1659
16604.8.7 / 2017-03-12
1661==================
1662 * fix(model): if last arg in spread is falsy, treat it as a callback #5061
1663 * fix(document): use $hook instead of hook to enable 'hook' as a path name #5047
1664 * fix(populate): dont select foreign field if parent field is selected #5037
1665 * fix(populate): handle passing no args to query.populate #5036
1666 * fix(update): use correct method for casting nested arrays #5032
1667 * fix(discriminator): handle array discriminators when casting $push #5009
1668
16694.8.6 / 2017-03-05
1670==================
1671 * docs(document): remove text that implies that transform is false by default #5023
1672 * fix(applyHooks): dont wrap a function if it is already wrapped #5019
1673 * fix(document): ensure nested docs' toObject() clones #5008
1674
16754.8.5 / 2017-02-25
1676==================
1677 * fix: check for empty schemaPath before accessing property $isMongooseDocumentArray #5017 [https://github.com/randyhoulahan](randyhoulahan)
1678 * fix(discriminators): handle create() and push() for embedded discriminators #5001
1679 * fix(querycursor): ensure close emitted after last data event #4998
1680 * fix(discriminators): remove fields not selected in child when querying by base model #4991
1681
16824.8.4 / 2017-02-19
1683==================
1684 * docs(discriminators): explain embedded discriminators #4997
1685 * fix(query): fix TypeError when findOneAndUpdate errors #4990
1686 * fix(update): handle nested single embedded in update validators correctly #4989
1687 * fix(browser): make browser doc constructor not crash #4987
1688
16894.8.3 / 2017-02-15
1690==================
1691 * chore: upgrade mongodb driver -> 2.2.24
1692 * docs(connections): addd some details about callbacks #4986
1693 * fix: ensure class is created with new keyword #4972 #4947 [benhjames](https://github.com/benhjames)
1694 * fix(discriminator): add applyPluginsToDiscriminators option #4965
1695 * fix(update): properly cast array subdocs when casting update #4960
1696 * fix(populate): ensure foreign field is selected for virtual populate #4959
1697 * docs(query): document some query callback params #4949
1698 * fix(document): ensure errors in validators get caught #2185
1699
17004.8.2 / 2017-02-10
1701==================
1702 * fix(update): actually run validators on addToSet #4953
1703 * fix(update): improve buffer error handling #4944 [ValYouW](https://github.com/ValYouW)
1704 * fix(discriminator): handle subclassing with loadClass correctly #4942
1705 * fix(query): allow passing Map to sort() #4941
1706 * fix(document): handle setting discriminator doc #4935
1707 * fix(schema): return correct value from pre init hook #4928
1708 * fix(query): ensure consistent params in error handlers if pre hook errors #4927
1709
17104.8.1 / 2017-01-30
1711==================
1712 * fix(query): handle $exists for arrays and embedded docs #4937
1713 * fix(query): handle passing string to hint() #4931
1714
17154.8.0 / 2017-01-28
1716==================
1717 * feat(schema): add saveErrorIfNotFound option and $where property #4924 #4004
1718 * feat(query): add $in implicitly if passed an array #4912 [QuotableWater7](https://github.com/QuotableWater7)
1719 * feat(aggregate): helper for $facet #4904 [varunjayaraman](https://github.com/varunjayaraman)
1720 * feat(query): add collation method #4839
1721 * feat(schema): propogate strict option to implicit array subschemas #4831 [dkrosso](https://github.com/dkrosso)
1722 * feat(aggregate): add helper for graphLookup #4819 [varunjayaraman](https://github.com/varunjayaraman)
1723 * feat(types): support Decimal128 #4759
1724 * feat(aggregate): add eachAsync() to aggregate cursor #4300
1725 * feat(query): add updateOne and updateMany #3997
1726 * feat(model): support options for insertMany #3893
1727 * fix(document): run validation on single nested docs if not directly modified #3884
1728 * feat(model): use discriminator constructor based on discriminatorKey in create() #3624
1729 * feat: pass collection as context to debug function #3261
1730 * feat(query): support push and addToSet for update validators #2933
1731 * perf(document): refactor registerHooksFromSchema so hooks are defined on doc prototype #2754
1732 * feat(types): add discriminator() function to doc arrays #2723 #1856
1733 * fix(populate): return an error if sorting underneath a doc array #2202
1734
17354.7.9 / 2017-01-27
1736==================
1737 * fix(query): handle casting $exists under $not #4933
1738 * chore: upgrade mongodb -> 2.2.22 re: #4931
1739
17404.7.8 / 2017-01-23
1741==================
1742 * fix(populate): better handling for virtual populate under arrays #4923
1743 * docs: upgrade contributors count #4918 [AdamZaczek](https://github.com/AdamZaczek)
1744 * fix(query): don't set nested path default if setting parent path #4911
1745 * docs(promise): add missing bracket #4907
1746 * fix(connection): ensure error handling is consistently async #4905
1747 * fix: handle authMechanism in query string #4900
1748 * fix(document): ensure error handlers run for validate #4885
1749
17504.7.7 / 2017-01-15
1751==================
1752 * fix(utils): don't crash if to[key] is null #4881
1753 * fix: upgrade mongodb -> 2.2.21 #4867
1754 * fix: add a toBSON to documents for easier querying #4866
1755 * fix: suppress bluebird warning #4854 [davidwu226](https://github.com/davidwu226)
1756 * fix(populate): handle nested virtuals in virtual populate #4851
1757
17584.7.6 / 2017-01-02
1759==================
1760 * fix(model): allow passing non-array to insertMany #4846
1761 * fix(populate): use base model name if no discriminator for backwards compat #4843
1762 * fix: allow internal validate callback to be optional #4842 [arciisine](https://github.com/arciisine)
1763 * fix(document): don't skip pointCut if save not defined (like in browser doc) #4841
1764 * chore: improve benchmarks #4838 [billouboq](https://github.com/billouboq)
1765 * perf: remove some unused parameters #4837 [billouboq](https://github.com/billouboq)
1766 * fix(query): don't call error handler if passRawResult is true and no error occurred #4836
1767
17684.7.5 / 2016-12-26
1769==================
1770 * docs(model): fix spelling mistake #4828 [paulinoj](https://github.com/paulinoj)
1771 * fix(aggregate): remove unhandled rejection when using aggregate.then() #4824
1772 * perf: remove try/catch that kills optimizer #4821
1773 * fix(model): handles populating with discriminators that may not have a ref #4817
1774 * fix(document): handle setting array of discriminators #3575
1775
17764.7.4 / 2016-12-21
1777==================
1778 * docs: fix typo #4810 [GEEKIAM](https://github.com/GEEKIAM)
1779 * fix(query): timestamps with $push + $each #4805
1780 * fix(document): handle buffers correctly in minimize #4800
1781 * fix: don't disallow overwriting default and cast fns #4795 [pdspicer](https://github.com/pdspicer)
1782 * fix(document): don't convert single nested docs to POJOs #4793
1783 * fix(connection): handle reconnect to replica set correctly #4972 [gfzabarino](https://github.com/gfzabarino)
1784
17854.7.3 / 2016-12-16
1786==================
1787 * fix: upgrade mongodb driver -> 2.2.16 for several bug fixes and 3.4 support #4799
1788 * fix(model): ensure discriminator key is correct for child schema on discriminator #4790
1789 * fix(document): handle mark valid in subdocs correctly #4778
1790 * fix(query): check for objects consistently #4775
1791
17924.7.2 / 2016-12-07
1793==================
1794 * test(populate): fix justOne test #4772 [cblanc](https://github.com/cblanc)
1795 * chore: fix benchmarks #4769 [billouboq](https://github.com/billouboq)
1796 * fix(document): handle setting subdoc to null after setting parent doc #4766
1797 * fix(query): support passRawResult with lean #4762 #4761 [mhfrantz](https://github.com/mhfrantz)
1798 * fix(query): throw StrictModeError if upsert with nonexisting field in condition #4757
1799 * test: fix a couple of sort tests #4756 [japod](https://github.com/japod)
1800 * chore: upgrade mongodb driver -> 2.2.12 #4753 [mdlavin](https://github.com/mdlavin)
1801 * fix(query): handle update with upsert and overwrite correctly #4749
1802
18034.7.1 / 2016-11-30
1804==================
1805 * fix(schema): throw error if you use prototype as a schema path #4746
1806 * fix(schema): throw helpful error if you define a virtual with the same path as a real path #4744
1807 * fix(connection): make createConnection not throw rejected promises #4742
1808 * fix(populate): allow specifiying options in model schema #4741
1809 * fix(document): handle selected nested elements with defaults #4739
1810 * fix(query): add model to cast error if possible #4729
1811 * fix(query): handle timestamps with overwrite #4054
1812
18134.7.0 / 2016-11-23
1814==================
1815 * docs: clean up schematypes #4732 [kidlj](https://github.com/kidlj)
1816 * perf: only get stack when necessary with VersionError #4726 [Sebmaster](https://github.com/Sebmaster)
1817 * fix(query): ensure correct casting when setting array element #4724
1818 * fix(connection): ensure db name gets set when you pass 4 params #4721
1819 * fix: prevent TypeError in node v7 #4719 #4706
1820 * feat(document): support .set() on virtual subpaths #4716
1821 * feat(populate): support populate virtuals on nested schemas #4715
1822 * feat(querycursor): support transform option and .map() #4714 #4705 [cblanc](https://github.com/cblanc)
1823 * fix(document): dont set defaults on not-selected nested paths #4707
1824 * fix(populate): don't throw if empty string passed to populate #4702
1825 * feat(model): add `loadClass()` function for importing schema from ES6 class #4668 [rockmacaca](https://github.com/rockmacaca)
1826
18274.6.8 / 2016-11-14
1828==================
1829 * fix(querycursor): clear stack when iterating onto next doc #4697
1830 * fix: handle null keys in validation error #4693 #4689 [arciisine](https://github.com/arciisine)
1831 * fix(populate): handle pre init middleware correctly with populate virtuals #4683
1832 * fix(connection): ensure consistent return value for open and openSet #4659
1833 * fix(schema): handle falsy defaults for arrays #4620
1834
18354.6.7 / 2016-11-10
1836==================
1837 * fix(document): only invalidate in subdoc if using update validators #4681
1838 * fix(document): don't create subdocs when excluded in projection #4669
1839 * fix(document): ensure single embedded schema validator runs with correct context #4663
1840 * fix(document): make sure to depopulate top level for sharding #4658
1841 * fix(connection): throw more helpful error when .model() called incorrectly #4652
1842 * fix(populate): throw more descriptive error when trying to populate a virtual that doesn't have proper options #4602
1843 * fix(document): ensure subtype gets set properly when saving with a buffer id #4506
1844 * fix(query): handle setDefaultsOnInsert with defaults on doc arrays #4456
1845 * fix(drivers): make debug output better by calling toBSON() #4356
1846
18474.6.6 / 2016-11-03
1848==================
1849 * chore: upgrade deps #4674 [TrejGun](https://github.com/TrejGun)
1850 * chore: run tests on node v7 #4673 [TrejGun](https://github.com/TrejGun)
1851 * perf: make setDefaultsOnInsert more efficient if upsert is off #4672 [CamHenlin](https://github.com/CamHenlin)
1852 * fix(populate): ensure document array is returned #4656
1853 * fix(query): cast doc arrays with positionals correctly for update #4655
1854 * fix(document): ensure single nested doc validators run with correct context #4654
1855 * fix: handle reconnect failed error in new version of driver #4653 [loris](https://github.com/loris)
1856 * fix(populate): if setting a populated doc, take its id #4632
1857 * fix(populate): handle populated virtuals in init #4618
1858
18594.6.5 / 2016-10-23
1860==================
1861 * docs: fix grammar issues #4642 #4640 #4639 [silvermanj7](https://github.com/silvermanj7)
1862 * fix(populate): filter out nonexistant values for dynref #4637
1863 * fix(query): handle $type as a schematype operator #4632
1864 * fix(schema): better handling for uppercase: false and lowercase: false #4622
1865 * fix(query): don't run transforms on updateForExec() #4621
1866 * fix(query): handle id = 0 in findById #4610
1867 * fix(query): handle buffers in mergeClone #4609
1868 * fix(document): handle undefined with conditional validator for validateSync #4607
1869 * fix: upgrade to mongodb driver 2.2.11 #4581
1870 * docs(schematypes): clarify schema.path() #4518
1871 * fix(query): ensure path is defined before checking in timestamps #4514
1872 * fix(model): set version key in upsert #4505
1873 * fix(document): never depopulate top-level doc #3057
1874 * refactor: ensure sync for setting non-capped collections #2690
1875
18764.6.4 / 2016-10-16
1877==================
1878 * fix(query): cast $not correctly #4616 #4592 [prssn](https://github.com/prssn)
1879 * fix: address issue with caching global plugins #4608 #4601 [TrejGun](https://github.com/TrejGun)
1880 * fix(model): make sure to depopulate in insertMany #4590
1881 * fix(model): buffer autoIndex if bufferCommands disabled #4589
1882 * fix(populate): copy ids array before modifying #4585
1883 * feat(schema): add retainKeyOrder prop #4542
1884 * fix(document): return isModified true for children of direct modified paths #4528
1885 * fix(connection): add dropDatabase() helper #4490
1886 * fix(model): add usePushEach option for schemas #4455
1887 * docs(connections): add some warnings about buffering #4413
1888 * fix: add ability to set promise implementation in browser #4395
1889
18904.6.3 / 2016-10-05
1891==================
1892 * fix(document): ensure single nested docs get initialized correctly when setting nested paths #4578
1893 * fix: turn off transforms when writing nested docs to db #4574
1894 * fix(document): don't set single nested subdocs to null when removing parent doc #4566
1895 * fix(model): ensure versionKey gets set in insertMany #4561
1896 * fix(schema): handle typeKey in arrays #4548
1897 * feat(schema): set $implicitlyCreated on schema if created by interpretAsType #4443
1898
18994.6.2 / 2016-09-30
1900==================
1901 * chore: upgrade to async 2.0.1 internally #4579 [billouboq](https://github.com/billouboq)
1902 * fix(types): ensure nested single doc schema errors reach update validators #4557 #4519
1903 * fix(connection): handle rs names with leading numbers (muri 1.1.1) #4556
1904 * fix(model): don't throw if method name conflicts with Object.prototype prop #4551
1905 * docs: fix broken link #4544 [VFedyk](https://github.com/VFedyk)
1906 * fix: allow overwriting model on mongoose singleton #4541 [Nainterceptor](https://github.com/Nainterceptor)
1907 * fix(document): don't use init: true when building doc defaults #4540
1908 * fix(connection): use replSet option if replset not specified #4535
1909 * fix(query): cast $not objects #4495
1910
19114.6.1 / 2016-09-20
1912==================
1913 * fix(query): improve handling of $not with $elemMatch #4531 #3719 [timbowhite](https://github.com/timbowhite)
1914 * fix: upgrade mongodb -> 2.2.10 #4517
1915 * chore: fix webpack build issue #4512 [saiichihashimoto](https://github.com/saiichihashimoto)
1916 * fix(query): emit error on next tick when exec callback errors #4500
1917 * test: improve test case #4496 [isayme](https://github.com/isayme)
1918 * fix(schema): use same check for array types and top-level types #4493
1919 * style: fix indentation in docs #4489 [dhurlburtusa](https://github.com/dhurlburtusa)
1920 * fix(schema): expose original object passed to constructor #4486
1921 * fix(query): handle findOneAndUpdate with array of arrays #4484 #4470 [fedotov](https://github.com/fedotov)
1922 * feat(document): add $ignore to make a path ignored #4480
1923 * fix(query): properly handle setting single embedded in update #4475 #4466 #4465
1924 * fix(updateValidators): handle single nested schema subpaths correctly #4479
1925 * fix(model): throw handy error when method name conflicts with property name #4475
1926 * fix(schema): handle .set() with array field #4472
1927 * fix(query): check nested path when avoiding double-validating Mixed #4441
1928 * fix(schema): handle calling path.trim() with no args correctly #4042
1929
19304.6.0 / 2016-09-02
1931==================
1932 * docs(document): clarify the findById and findByIdAndUpdate examples #4471 [mdcanham](https://github.com/mdcanham)
1933 * docs(schematypes): add details re: options #4452
1934 * docs(middleware): add docs for insertMany hooks #4451
1935 * fix(schema): create new array when copying from existing object to preserve change tracking #4449
1936 * docs: fix typo in index.jade #4448
1937 * fix(query): allow array for populate options #4446
1938 * fix(model): create should not cause unhandle reject promise #4439
1939 * fix: upgrade to mongodb driver 2.2.9 #4363 #4341 #4311 (see [comments here](https://github.com/mongodb/js-bson/commit/aa0b54597a0af28cce3530d2144af708e4b66bf0#commitcomment-18850498) if you use node 0.10)
1940
19414.5.10 / 2016-08-23
1942===================
1943 * docs: fix typo on documents.jade #4444 [Gabri3l](https://github.com/Gabri3l)
1944 * chore: upgrade mocha to 3.0.2 #4437 [TrejGun](https://github.com/TrejGun)
1945 * fix: subdocuments causing error with parent timestamp on update #4434 [dyang108](https://github.com/dyang108)
1946 * fix(query): don't crash if timestamps on and update doesn't have a path #4425 #4424 #4418
1947 * fix(query): ensure single nested subdoc is hydrated when running update validators #4420
1948 * fix(query): cast non-$geometry operators for $geoWithin #4419
1949 * docs: update contributor count #4415 [AdamZaczek](https://github.com/AdamZaczek)
1950 * docs: add more clarification re: the index event #4410
1951 * fix(document): only skip modifying subdoc path if parent is direct modified #4405
1952 * fix(schema): throw cast error if provided date invalid #4404
1953 * feat(error): use util.inspect() so CastError never prints "[object Object]" #4398
1954 * fix(model): dont error if the discriminator key is unchanged #4387
1955 * fix(query): don't throw unhandled rejection with bluebird when using cbs #4379
1956
19574.5.9 / 2016-08-14
1958==================
1959 * docs: add mixed schema doc for Object literal #4400 [Kikobeats](https://github.com/Kikobeats)
1960 * fix(query): cast $geoWithin and convert mongoose objects to POJOs before casting #4392
1961 * fix(schematype): dont cast defaults without parent doc #4390
1962 * fix(query): disallow passing empty string to findOne() #4378
1963 * fix(document): set single nested doc isNew correctly #4369
1964 * fix(types): checks field name correctly with nested arrays and populate #4365
1965 * fix(drivers): make debug output copy-pastable into mongodb shell #4352
1966 * fix(services): run update validators on nested paths #4332
1967 * fix(model): handle typeKey with discriminators #4339
1968 * fix(query): apply timestamps to child schemas when explicitly specified in update #4049
1969 * fix(schema): set prefix as nested path with add() #1730
1970
19714.5.8 / 2016-08-01
1972==================
1973 * fix(model): make changing the discriminator key cause a cast error #4374
1974 * fix(query): pass projection fields to cursor #4371 #4342 [Corei13](https://github.com/Corei13)
1975 * fix(document): support multiple paths for isModified #4370 [adambuczynski](https://github.com/adambuczynski)
1976 * fix(querycursor): always cast fields before returning cursor #4355
1977 * fix(query): support projection as alias for fields in findOneAndUpdate #4315
1978 * fix(schema): treat index false + unique false as no index #4304
1979 * fix(types): dont mark single nested subpath as modified if whole doc already modified #4224
1980
19814.5.7 / 2016-07-25
1982==================
1983 * fix(document): ensure no unhandled rejections if callback specified for save #4364
1984
19854.5.6 / 2016-07-23
1986==================
1987 * fix(schema): don't overwrite createdAt if it isn't selected #4351 [tusbar](https://github.com/tusbar)
1988 * docs(api): fix link to populate() and add a new one from depopulate() #4345 [Delapouite](https://github.com/Delapouite)
1989 * fix(types): ownerDocument() works properly with single nested docs #4344 [vichle](https://github.com/vichle)
1990 * fix(populate): dont use findOne when justOne option set #4329
1991 * fix(document): dont trigger .then() deprecated warning when calling doc.remove() #4291
1992 * docs(connection): add promiseLibrary option #4280
1993 * fix(plugins): apply global plugins to subschemas #4271
1994 * fix(model): ensure `ensureIndex()` never calls back in the same tick #4246
1995 * docs(schema): improve post hook docs on schema #4238
1996
19974.5.5 / 2016-07-18
1998==================
1999 * fix(document): handle setting root to empty obj if minimize false #4337
2000 * fix: downgrade to mongodb 2.1.18 #4335 #4334 #4328 #4323
2001 * perf(types): remove defineProperty usage in documentarray #4333
2002 * fix(query): correctly pass model in .toConstructor() #4318
2003 * fix(services): avoid double-validating mixed types with update validators #4305
2004 * docs(middleware): add docs describing error handling middleware #4229
2005 * fix(types): throw correct error when invalidating doc array #3602
2006
20074.5.4 / 2016-07-11
2008==================
2009 * fix(types): fix removing embedded documents #4309 [RoCat](https://github.com/RoCat)
2010 * docs: various docs improvements #4302 #4294 [simonxca](https://github.com/simonxca)
2011 * fix: upgrade mongodb -> 2.1.21 #4295 #4202 [RoCat](https://github.com/RoCat)
2012 * fix(populate): convert single result to array for virtual populate because of lean #4288
2013 * fix(populate): handle empty results for populate virtuals properly #4285 #4284
2014 * fix(query): dont cast $inc to number if type is long #4283
2015 * fix(types): allow setting single nested doc to null #4281
2016 * fix(populate): handle deeply nested virtual populate #4278
2017 * fix(document): allow setting empty obj if strict mode is false #4274
2018 * fix(aggregate): allow passing obj to .unwind() #4239
2019 * docs(document): add return statements to transform examples #1963
2020
20214.5.3 / 2016-06-30
2022==================
2023 * fix(query): pass correct options to QueryCursor #4277 #4266
2024 * fix(querycursor): handle lean option correctly #4276 [gchudnov](https://github.com/gchudnov)
2025 * fix(document): fix error handling when no error occurred #4275
2026 * fix(error): use strict mode for version error #4272
2027 * docs(populate): fix crashing compilation for populate.jade #4267
2028 * fix(populate): support `justOne` option for populate virtuals #4263
2029 * fix(populate): ensure model param gets used for populate virtuals #4261 #4243
2030 * fix(querycursor): add ability to properly close the cursor #4258
2031 * docs(model): correct link to Document #4250
2032 * docs(populate): correct path for refPath populate #4240
2033 * fix(document): support validator.isEmail as validator #4064
2034
20354.5.2 / 2016-06-24
2036==================
2037 * fix(connection): add checks for collection presence for `onOpen` and `onClose` #4259 [nodkz](https://github.com/nodkz)
2038 * fix(cast): allow strings for $type operator #4256
2039 * fix(querycursor): support lean() #4255 [pyramation](https://github.com/pyramation)
2040 * fix(aggregate): allow setting noCursorTimeout option #4241
2041 * fix(document): handle undefined for Array.pull #4222 [Sebmaster](https://github.com/Sebmaster)
2042 * fix(connection): ensure promise.catch() catches initial connection error #4135
2043 * fix(document): show additional context for VersionError #2633
2044
20454.5.1 / 2016-06-18
2046==================
2047 * fix(model): ensure wrapped insertMany() returns a promise #4237
2048 * fix(populate): dont overwrite populateVirtuals when populating multiple paths #4234
2049 * docs(model): clarify relationship between create() and save() #4233
2050 * fix(types): handle option param in subdoc remove() #4231 [tdebarochez](https://github.com/tdebarochez)
2051 * fix(document): dedupe modified paths #4226 #4223 [adambuczynski](https://github.com/adambuczynski)
2052 * fix(model): don't modify user-provided options object #4221
2053 * fix(document): handle setting nested path to empty object #4218 #4182
2054 * fix(document): clean subpaths when removing single nested #4216
2055 * fix(document): don't force transform on subdocs with inspect #4213
2056 * fix(error): allow setting .messages object #4207
2057
20584.5.0 / 2016-06-13
2059==================
2060 * feat(query): added Query.prototype.catch() #4215 #4173 [adambuczynski](https://github.com/adambuczynski)
2061 * feat(query): add Query.prototype.cursor() as a .stream() alternative #4117 #3637 #1907
2062 * feat(document): add markUnmodified() function #4092 [vincentcr](https://github.com/vincentcr)
2063 * feat(aggregate): convert aggregate object to a thenable #3995 #3946 [megagon](https://github.com/megagon)
2064 * perf(types): remove defineProperties call for array (**Note:** Because of this, a mongoose array will no longer `assert.deepEqual()` a plain old JS array) #3886
2065 * feat(model): add hooks for insertMany() #3846
2066 * feat(schema): add support for custom query methods #3740 #2372
2067 * feat(drivers): emit error on 'serverClosed' because that means that reconnect failed #3615
2068 * feat(model): emit error event when callback throws exception #3499
2069 * feat(model): inherit options from discriminator base schema #3414 #1818
2070 * feat(populate): expose mongoose-populate-virtuals inspired populate API #2562
2071 * feat(document): trigger remove hooks on subdocs when removing parent #2348
2072 * feat(schema): add support for express-style error handling middleware #2284
2073 * fix(model): disallow setting discriminator key #2041
2074 * feat(schema): add support for nested arrays #1361
2075
20764.4.20 / 2016-06-05
2077===================
2078 * docs: clarify command buffering when using driver directly #4195
2079 * fix(promise): correct broken mpromise .catch() #4189
2080 * fix(document): clean modified subpaths when set path to empty obj #4182
2081 * fix(query): support minDistance with query casting and `.near()` #4179
2082 * fix(model): remove unnecessary .save() promise #4177
2083 * fix(schema): cast all valid ObjectId strings to object ids #3365
2084 * docs: remove unclear "unsafe" term in query docs #3282
2085
20864.4.19 / 2016-05-21
2087===================
2088 * fix(model): handle insertMany if timestamps not set #4171
2089
20904.4.18 / 2016-05-21
2091===================
2092 * docs: add missing period #4170 [gitname](https://github.com/gitname)
2093 * docs: change build badge to svg #4158 [a0viedo](https://github.com/a0viedo)
2094 * fix(model): update timestamps when setting `createdAt` #4155
2095 * fix(utils): make sure to require in document properly #4152
2096 * fix(model): throw overwrite error when discriminator name conflicts #4148
2097
20984.4.17 / 2016-05-13
2099===================
2100 * docs: remove repetition in QueryStream docs #4147 [hugoabonizio](https://github.com/hugoabonizio)
2101 * fix(document): dont double-validate doc array elements #4145
2102 * fix(document): call required function with correct scope #4142 [JedWatson](https://github.com/JedWatson)
2103
21044.4.16 / 2016-05-09
2105===================
2106 * refactor(document): use function reference #4133 [dciccale](https://github.com/dciccale)
2107 * docs(querystream): clarify `destroy()` and close event #4126 [AnthonyCC](https://github.com/AnthonyCC)
2108 * test: make before hook fail fast if it can't connect #4121
2109 * docs: add description of CastError constructor params #4120
2110 * fix(schematype): ensure single embedded defaults have $parent #4115
2111 * fix(document): mark nested paths for validation #4111
2112 * fix(schema): make sure element is always a subdoc in doc array validation #3816
2113
21144.4.15 / 2016-05-06
2115===================
2116 * fix(schema): support overwriting array default #4109
2117 * fix(populate): assign values when resolving each populate #4104
2118 * fix(aggregate): dont send async option to server #4101
2119 * fix(model): ensure isNew set to false after insertMany #4099
2120 * fix(connection): emit on error if listeners and no callback #4098
2121 * fix(document): treat required fn that returns false as required: false #4094
2122
21234.4.14 / 2016-04-27
2124===================
2125 * fix: upgrade mongodb -> 2.1.18 #4102
2126 * feat(connection): allow setting mongos as a uri query param #4093 #4035 [burtonjc](https://github.com/burtonjc)
2127 * fix(populate): make sure to use correct assignment order for each model #4073
2128 * fix(schema): add complete set of geospatial operators for single embedded subdocs #4014
2129
21303.8.40 / 2016-04-24
2131===================
2132 * upgraded; mquery -> 1.10.0 #3989
2133
21344.4.13 / 2016-04-21
2135===================
2136 * docs: add docs favicons #4082 [robertjustjones](https://github.com/robertjustjones)
2137 * docs(model): correct Model.remove() return value #4075 [Jokero](https://github.com/Jokero)
2138 * fix(query): add $geoWithin query casting for single embedded docs #4044
2139 * fix(schema): handle setting trim option to falsy #4042
2140 * fix(query): handle setDefaultsOnInsert with empty update #3835
2141
21424.4.12 / 2016-04-08
2143===================
2144 * docs(query): document context option for update and findOneAndUpdate #4055
2145 * docs(query): correct link to $geoWithin docs #4050
2146 * fix(project): upgrade to mongodb driver 2.1.16 #4048 [schmalliso](https://github.com/schmalliso)
2147 * docs(validation): fix validation docs #4028
2148 * fix(types): improve .id() check for document arrays #4011
2149 * fix(query): remove premature return when using $rename #3171
2150 * docs(connection): clarify relationship between models and connections #2157
2151
21524.4.11 / 2016-04-03
2153===================
2154 * fix: upgrade to mongodb driver 2.1.14 #4036 #4030 #3945
2155 * fix(connection): allow connecting with { mongos: true } to handle query params #4032 [burtonjc](https://github.com/burtonjc)
2156 * docs(connection): add autoIndex example #4026 [tilleps](https://github.com/tilleps)
2157 * fix(query): handle passRawResult option when zero results #4023
2158 * fix(populate): clone options before modifying #4022
2159 * docs: add missing whitespace #4019 [chenxsan](https://github.com/chenxsan)
2160 * chore: upgrade to ESLint 2.4.0 #4015 [ChristianMurphy](https://github.com/ChristianMurphy)
2161 * fix(types): single nested subdocs get ids by default #4008
2162 * chore(project): add dependency status badge #4007 [Maheshkumar-Kakade](http://github.com/Maheshkumar-Kakade)
2163 * fix: make sure timestamps don't trigger unnecessary updates #4005 #3991 [tommarien](https://github.com/tommarien)
2164 * fix(document): inspect inherits schema options #4001
2165 * fix(populate): don't mark populated path as modified if setting to object w/ same id #3992
2166 * fix(document): support kind argument to invalidate #3965
2167
21684.4.10 / 2016-03-24
2169===================
2170 * fix(document): copy isNew when copying a document #3982
2171 * fix(document): don't override defaults with undefined keys #3981
2172 * fix(populate): merge multiple deep populate options for the same path #3974
2173
21744.4.9 / 2016-03-22
2175==================
2176 * fix: upgrade mongodb -> 2.1.10 re https://jira.mongodb.org/browse/NODE-679 #4010
2177 * docs: add syntax highlighting for acquit examples #3975
2178
21794.4.8 / 2016-03-18
2180==================
2181 * docs(aggregate): clarify promises #3990 [megagon](https://github.com/megagon)
2182 * fix: upgrade mquery -> 1.10 #3988 [matskiv](https://github.com/matskiv)
2183 * feat(connection): 'all' event for repl sets #3986 [xizhibei](https://github.com/xizhibei)
2184 * docs(types): clarify Array.pull #3985 [seriousManual](https://github.com/seriousManual)
2185 * feat(query): support array syntax for .sort() via mquery 1.9 #3980
2186 * fix(populate): support > 3 level nested populate #3973
2187 * fix: MongooseThenable exposes connection correctly #3972
2188 * docs(connection): add note about reconnectTries and reconnectInterval #3969
2189 * feat(document): invalidate returns the new validationError #3964
2190 * fix(query): .eq() as shorthand for .equals #3953 [Fonger](https://github.com/Fonger)
2191 * docs(connection): clarify connection string vs passed options #3941
2192 * docs(query): select option for findOneAndUpdate #3933
2193 * fix(error): ValidationError.properties no longer enumerable #3925
2194 * docs(validation): clarify how required validators work with nested schemas #3915
2195 * fix: upgrade mongodb driver -> 2.1.8 to make partial index errors more sane #3864
2196
21974.4.7 / 2016-03-11
2198==================
2199 * fix(query): stop infinite recursion caused by merging a mongoose buffer #3961
2200 * fix(populate): handle deep populate array -> array #3954
2201 * fix(schema): allow setting timestamps with .set() #3952 #3951 #3907 [Fonger](https://github.com/Fonger)
2202 * fix: MongooseThenable doesn't overwrite constructors #3940
2203 * fix(schema): don't cast boolean to date #3935
2204 * fix(drivers): support sslValidate in connection string #3929
2205 * fix(types): correct markModified() for single nested subdocs #3910
2206 * fix(drivers): catch and report any errors that occur in driver methods #3906
2207 * fix(populate): get subpopulate model correctly when array under nested #3904
2208 * fix(document): allow fields named 'pre' and 'post' #3902
2209 * docs(query): clarify runValidators and setDefaultsOnInsert options #3892
2210 * docs(validation): show how to use custom required messages in schema #2616
2211
22124.4.6 / 2016-03-02
2213==================
2214 * fix: upgrade mongodb driver to 2.1.7 #3938
2215 * docs: fix plugins link #3917 #3909 [fbertone](https://github.com/fbertone)
2216 * fix(query): sort+select with count works #3914
2217 * fix(query): improve mergeUpdate's ability to handle nested docs #3890
2218
22194.4.5 / 2016-02-24
2220==================
2221 * fix(query): ability to select a length field (upgrade to mquery 1.7.0) #3903
2222 * fix: include nested CastError as reason for array CastError #3897 [kotarou3](https://github.com/kotarou3)
2223 * fix(schema): check for doc existence before taking fields #3889
2224 * feat(schema): useNestedStrict option to take nested strict mode for update #3883
2225 * docs(validation): clarify relationship between required and checkRequired #3822
2226 * docs(populate): dynamic reference docs #3809
2227 * docs: expand dropdown when clicking on file name #3807
2228 * docs: plugins.mongoosejs.io is up #3127
2229 * fix(schema): ability to add a virtual with same name as removed path #2398
2230
22314.4.4 / 2016-02-17
2232==================
2233 * fix(schema): handle field selection when casting single nested subdocs #3880
2234 * fix(populate): populating using base model with multiple child models in result #3878
2235 * fix: ability to properly use return value of `mongoose.connect()` #3874
2236 * fix(populate): dont hydrate populated subdoc if lean option set #3873
2237 * fix(connection): dont re-auth if already connected with useDb #3871
2238 * docs: cover how to set underlying driver's promise lib #3869
2239 * fix(document): handle conflicting names in validation errors with subdocs #3867
2240 * fix(populate): set undefined instead of null consistently when populate couldn't find results #3859
2241 * docs: link to `execPopulate()` in `doc.populate()` docs #3836
2242 * docs(plugin): link to the `mongoose.plugin()` function #3732
2243
22444.4.3 / 2016-02-09
2245==================
2246 * fix: upgrade to mongodb 2.1.6 to remove kerberos log output #3861 #3860 [cartuchogl](https://github.com/cartuchogl)
2247 * fix: require('mongoose') is no longer a pseudo-promise #3856
2248 * fix(query): update casting for single nested docs #3820
2249 * fix(populate): deep populating multiple paths with same options #3808
2250 * docs(middleware): clarify save/validate hook order #1149
2251
22524.4.2 / 2016-02-05
2253==================
2254 * fix(aggregate): handle calling .cursor() with no options #3855
2255 * fix: upgrade mongodb driver to 2.1.5 for GridFS memory leak fix #3854
2256 * docs: fix schematype.html conflict #3853 #3850 #3843
2257 * fix(model): bluebird unhandled rejection with ensureIndexes() on init #3837
2258 * docs: autoIndex option for createConnection #3805
2259
22604.4.1 / 2016-02-03
2261==================
2262 * fix: linting broke some cases where we use `== null` as shorthand #3852
2263 * docs: fix up schematype.html conflict #3848 #3843 [mynameiscoffey](https://github.com/mynameiscoffey)
2264 * fix: backwards breaking change with `.connect()` return value #3847
2265 * docs: downgrade dox and highlight.js to fix docs build #3845
2266 * docs: clean up typo #3842 [Flash-](https://github.com/Flash-)
2267 * fix(document): storeShard handles undefined values #3841
2268 * chore: more linting #3838 [TrejGun](https://github.com/TrejGun)
2269 * fix(schema): handle `text: true` as a way to declare a text index #3824
2270
22714.4.0 / 2016-02-02
2272==================
2273 * docs: fix expireAfterSeconds index option name #3831 [Flash-](https://github.com/Flash-)
2274 * chore: run lint after test #3829 [ChristianMurphy](https://github.com/ChristianMurphy)
2275 * chore: use power-assert instead of assert #3828 [TrejGun](https://github.com/TrejGun)
2276 * chore: stricter lint #3827 [TrejGun](https://github.com/TrejGun)
2277 * feat(types): casting moment to date #3813 [TrejGun](https://github.com/TrejGun)
2278 * chore: comma-last lint for test folder #3810 [ChristianMurphy](https://github.com/ChristianMurphy)
2279 * fix: upgrade async mpath, mpromise, muri, and sliced #3801 [TrejGun](https://github.com/TrejGun)
2280 * fix(query): geo queries now return proper ES2015 promises #3800 [TrejGun](https://github.com/TrejGun)
2281 * perf(types): use `Object.defineProperties()` for array #3799 [TrejGun](https://github.com/TrejGun)
2282 * fix(model): mapReduce, ensureIndexes, remove, and save properly return ES2015 promises #3795 #3628 #3595 [TrejGun](https://github.com/TrejGun)
2283 * docs: fixed dates in History.md #3791 [Jokero](https://github.com/Jokero)
2284 * feat: connect, open, openSet, and disconnect return ES2015 promises #3790 #3622 [TrejGun](https://github.com/TrejGun)
2285 * feat: custom type for int32 via mongoose-int32 npm package #3652 #3102
2286 * feat: basic custom schema type API #995
2287 * feat(model): `insertMany()` for more performant bulk inserts #723
2288
22894.3.7 / 2016-01-23
2290==================
2291 * docs: grammar fix in timestamps docs #3786 [zclancy](https://github.com/zclancy)
2292 * fix(document): setting nested populated docs #3783 [slamuu](https://github.com/slamuu)
2293 * fix(document): don't call post save hooks twice for pushed docs #3780
2294 * fix(model): handle `_id=0` correctly #3776
2295 * docs(middleware): async post hooks #3770
2296 * docs: remove confusing sentence #3765 [marcusmellis89](https://github.com/marcusmellis89)
2297
22983.8.39 / 2016-01-15
2299===================
2300 * fixed; casting a number to a buffer #3764
2301 * fixed; enumerating virtual property with nested objects #3743 [kusold](https://github.com/kusold)
2302
23034.3.6 / 2016-01-15
2304==================
2305 * fix(types): casting a number to a buffer #3764
2306 * fix: add "listener" to reserved keywords #3759
2307 * chore: upgrade uglify #3757 [ChristianMurphy](https://github.com/ChristianMurphy)
2308 * fix: broken execPopulate() in 4.3.5 #3755 #3753
2309 * fix: ability to remove() a single embedded doc #3754
2310 * style: comma-last in test folder #3751 [ChristianMurphy](https://github.com/ChristianMurphy)
2311 * docs: clarify versionKey option #3747
2312 * fix: improve colorization for arrays #3744 [TrejGun](https://github.com/TrejGun)
2313 * fix: webpack build #3713
2314
23154.3.5 / 2016-01-09
2316==================
2317 * fix(query): throw when 4th parameter to update not a function #3741 [kasselTrankos](https://github.com/kasselTrankos)
2318 * fix(document): separate error type for setting an object to a primitive #3735
2319 * fix(populate): Model.populate returns ES6 promise #3734
2320 * fix(drivers): re-register event handlers after manual reconnect #3729
2321 * docs: broken links #3727
2322 * fix(validation): update validators run array validation #3724
2323 * docs: clarify the need to use markModified with in-place date ops #3722
2324 * fix(document): mark correct path as populated when manually populating array #3721
2325 * fix(aggregate): support for array pipeline argument to append #3718 [dbkup](https://github.com/dbkup)
2326 * docs: clarify `.connect()` callback #3705
2327 * fix(schema): properly validate nested single nested docs #3702
2328 * fix(types): handle setting documentarray of wrong type #3701
2329 * docs: broken links #3700
2330 * fix(drivers): debug output properly displays '0' #3689
2331
23323.8.38 / 2016-01-07
2333===================
2334 * fixed; aggregate.append an array #3730 [dbkup](https://github.com/dbkup)
2335
23364.3.4 / 2015-12-23
2337==================
2338 * fix: upgrade mongodb driver to 2.1.2 for repl set error #3712 [sansmischevia](https://github.com/sansmischevia)
2339 * docs: validation docs typo #3709 [ivanmaeder](https://github.com/ivanmaeder)
2340 * style: remove unused variables #3708 [ChristianMurphy](https://github.com/ChristianMurphy)
2341 * fix(schema): duck-typing for schemas #3703 [mgcrea](https://github.com/mgcrea)
2342 * docs: connection sample code issue #3697
2343 * fix(schema): duck-typing for schemas #3693 [mgcrea](https://github.com/mgcrea)
2344 * docs: clarify id schema option #3638
2345
23464.3.3 / 2015-12-18
2347==================
2348 * fix(connection): properly support 'replSet' as well as 'replset' #3688 [taxilian](https://github.com/taxilian)
2349 * fix(document): single nested doc pre hooks called before nested doc array #3687 [aliatsis](https://github.com/aliatsis)
2350
23514.3.2 / 2015-12-17
2352==================
2353 * fix(document): .set() into single nested schemas #3686
2354 * fix(connection): support 'replSet' as well as 'replset' option #3685
2355 * fix(document): bluebird unhandled rejection when validating doc arrays #3681
2356 * fix(document): hooks for doc arrays in single nested schemas #3680
2357 * fix(document): post hooks for single nested schemas #3679
2358 * fix: remove unused npm module #3674 [sybarite](https://github.com/sybarite)
2359 * fix(model): don't swallow exceptions in nested doc save callback #3671
2360 * docs: update keepAlive info #3667 [ChrisZieba](https://github.com/ChrisZieba)
2361 * fix(document): strict 'throw' throws a specific mongoose error #3662
2362 * fix: flakey test #3332
2363 * fix(query): more robust check for RegExp #2969
2364
23654.3.1 / 2015-12-11
2366==================
2367 * feat(aggregate): `.sample()` helper #3665
2368 * fix(query): bitwise query operators with buffers #3663
2369 * docs(migration): clarify `new` option and findByIdAndUpdate #3661
2370
23714.3.0 / 2015-12-09
2372==================
2373 * feat(query): support for mongodb 3.2 bitwise query operators #3660
2374 * style: use comma-last style consistently #3657 [ChristianMurphy](https://github.com/ChristianMurphy)
2375 * feat: upgrade mongodb driver to 2.1.0 for full MongoDB 3.2 support #3656
2376 * feat(aggregate): `.lookup()` helper #3532
2377
23784.2.10 / 2015-12-08
2379===================
2380 * fixed; upgraded marked #3653 [ChristianMurphy](https://github.com/ChristianMurphy)
2381 * docs; cross-db populate #3648
2382 * docs; update mocha URL #3646 [ojhaujjwal](https://github.com/ojhaujjwal)
2383 * fixed; call close callback asynchronously #3645
2384 * docs; virtuals.html issue #3644 [Psarna94](https://github.com/Psarna94)
2385 * fixed; single embedded doc casting on init #3642
2386 * docs; validation docs improvements #3640
2387
23884.2.9 / 2015-12-02
2389==================
2390 * docs; defaults docs #3625
2391 * fix; nested numeric keys causing an embedded document crash #3623
2392 * fix; apply path getters before virtual getters #3618
2393 * fix; casting for arrays in single nested schemas #3616
2394
23954.2.8 / 2015-11-25
2396==================
2397 * docs; clean up README links #3612 [ReadmeCritic](https://github.com/ReadmeCritic)
2398 * fix; ESLint improvements #3605 [ChristianMurphy](https://github.com/ChristianMurphy)
2399 * fix; assigning single nested subdocs #3601
2400 * docs; describe custom logging functions in `mongoose.set()` docs #3557
2401
24024.2.7 / 2015-11-20
2403==================
2404 * fixed; readPreference connection string option #3600
2405 * fixed; pulling from manually populated arrays #3598 #3579
2406 * docs; FAQ about OverwriteModelError #3597 [stcruy](https://github.com/stcruy)
2407 * fixed; setting single embedded schemas to null #3596
2408 * fixed; indexes for single embedded schemas #3594
2409 * docs; clarify projection for `findOne()` #3593 [gunar](https://github.com/gunar)
2410 * fixed; .ownerDocument() method on single embedded schemas #3589
2411 * fixed; properly throw casterror for query on single embedded schema #3580
2412 * upgraded; mongodb driver -> 2.0.49 for reconnect issue fix #3481
2413
24144.2.6 / 2015-11-16
2415==================
2416 * fixed; ability to manually populate an array #3575
2417 * docs; clarify `isAsync` parameter to hooks #3573
2418 * fixed; use captureStackTrace if possible instead #3571
2419 * fixed; crash with buffer and update validators #3565 [johnpeb](https://github.com/johnpeb)
2420 * fixed; update casting with operators overwrite: true #3564
2421 * fixed; validation with single embedded docs #3562
2422 * fixed; inline docs inherit parents $type key #3560
2423 * docs; bad grammar in populate docs #3559 [amaurymedeiros](https://github.com/amaurymedeiros)
2424 * fixed; properly handle populate option for find() #2321
2425
24263.8.37 / 2015-11-16
2427===================
2428 * fixed; use retainKeyOrder for cloning update op #3572
2429
24304.2.5 / 2015-11-09
2431==================
2432 * fixed; handle setting fields in pre update hooks with exec #3549
2433 * upgraded; ESLint #3547 [ChristianMurphy](https://github.com/ChristianMurphy)
2434 * fixed; bluebird unhandled rejections with cast errors and .exec #3543
2435 * fixed; min/max validators handling undefined #3539
2436 * fixed; standalone mongos connections #3537
2437 * fixed; call `.toObject()` when setting a single nested doc #3535
2438 * fixed; single nested docs now have methods #3534
2439 * fixed; single nested docs with .create() #3533 #3521 [tusbar](https://github.com/tusbar)
2440 * docs; deep populate docs #3528
2441 * fixed; deep populate schema ref handling #3507
2442 * upgraded; mongodb driver -> 2.0.48 for sort overflow issue #3493
2443 * docs; clarify default ids for discriminators #3482
2444 * fixed; properly support .update(doc) #3221
2445
24464.2.4 / 2015-11-02
2447==================
2448 * fixed; upgraded `ms` package for security vulnerability #3524 [fhemberger](https://github.com/fhemberger)
2449 * fixed; ESlint rules #3517 [ChristianMurphy](https://github.com/ChristianMurphy)
2450 * docs; typo in aggregation docs #3513 [rafakato](https://github.com/rafakato)
2451 * fixed; add `dontThrowCastError` option to .update() for promises #3512
2452 * fixed; don't double-cast buffers in node 4.x #3510 #3496
2453 * fixed; population with single embedded schemas #3501
2454 * fixed; pre('set') hooks work properly #3479
2455 * docs; promises guide #3441
2456
24574.2.3 / 2015-10-26
2458==================
2459 * docs; remove unreferenced function in middleware.jade #3506
2460 * fixed; handling auth with no username/password #3500 #3498 #3484 [mleanos](https://github.com/mleanos)
2461 * fixed; more ESlint rules #3491 [ChristianMurphy](https://github.com/ChristianMurphy)
2462 * fixed; swallowing exceptions in save callback #3478
2463 * docs; fixed broken links in subdocs guide #3477
2464 * fixed; casting booleans to numbers #3475
2465 * fixed; report CastError for subdoc arrays in findOneAndUpdate #3468
2466 * fixed; geoNear returns ES6 promise #3458
2467
24684.2.2 / 2015-10-22
2469==================
2470 * fixed; go back to old pluralization code #3490
2471
24724.2.1 / 2015-10-22
2473==================
2474 * fixed; pluralization issues #3492 [ChristianMurphy](https://github.com/ChristianMurphy)
2475
24764.2.0 / 2015-10-22
2477==================
2478 * added; support for skipVersioning for document arrays #3467 [chazmo03](https://github.com/chazmo03)
2479 * added; ability to customize schema 'type' key #3459 #3245
2480 * fixed; writeConcern for index builds #3455
2481 * added; emit event when individual index build starts #3440 [objectiveSee](https://github.com/objectiveSee)
2482 * added; 'context' option for update validators #3430
2483 * refactor; pluralization now in separate pluralize-mongoose npm module #3415 [ChristianMurphy](https://github.com/ChristianMurphy)
2484 * added; customizable error validation messages #3406 [geronime](https://github.com/geronime)
2485 * added; support for passing 'minimize' option to update #3381
2486 * added; ability to customize debug logging format #3261
2487 * added; baseModelName property for discriminator models #3202
2488 * added; 'emitIndexErrors' option #3174
2489 * added; 'async' option for aggregation cursor to support buffering #3160
2490 * added; ability to skip validation for individual save() calls #2981
2491 * added; single embedded schema support #2689 #585
2492 * added; depopulate function #2509
2493
24944.1.12 / 2015-10-19
2495===================
2496 * docs; use readPreference instead of slaveOk for Query.setOptions docs #3471 [buunguyen](https://github.com/buunguyen)
2497 * fixed; more helpful error when regexp contains null bytes #3456
2498 * fixed; x509 auth issue #3454 [NoxHarmonium](https://github.com/NoxHarmonium)
2499
25003.8.36 / 2015-10-18
2501===================
2502 * fixed; Make array props non-enumerable #3461 [boblauer](https://github.com/boblauer)
2503
25044.1.11 / 2015-10-12
2505===================
2506 * fixed; update timestamps for update() if they're enabled #3450 [isayme](https://github.com/isayme)
2507 * fixed; unit test error on node 0.10 #3449 [isayme](https://github.com/isayme)
2508 * docs; timestamp option docs #3448 [isayme](https://github.com/isayme)
2509 * docs; fix unexpected indent #3443 [isayme](https://github.com/isayme)
2510 * fixed; use ES6 promises for Model.prototype.remove() #3442
2511 * fixed; don't use unused 'safe' option for index builds #3439
2512 * fixed; elemMatch casting bug #3437 #3435 [DefinitelyCarter](https://github.com/DefinitelyCarter)
2513 * docs; schema.index docs #3434
2514 * fixed; exceptions in save() callback getting swallowed on mongodb 2.4 #3371
2515
25164.1.10 / 2015-10-05
2517===================
2518 * docs; improve virtuals docs to explain virtuals schema option #3433 [zoyaH](https://github.com/zoyaH)
2519 * docs; MongoDB server version compatibility guide #3427
2520 * docs; clarify that findById and findByIdAndUpdate fire hooks #3422
2521 * docs; clean up Model.save() docs #3420
2522 * fixed; properly handle projection with just id #3407 #3412
2523 * fixed; infinite loop when database document is corrupted #3405
2524 * docs; clarify remove middleware #3388
2525
25264.1.9 / 2015-09-28
2527==================
2528 * docs; minlength and maxlength string validation docs #3368 #3413 [cosmosgenius](https://github.com/cosmosgenius)
2529 * fixed; linting for infix operators #3397 [ChristianMurphy](https://github.com/ChristianMurphy)
2530 * fixed; proper casting for $all #3394
2531 * fixed; unhandled rejection warnings with .create() #3391
2532 * docs; clarify update validators on paths that aren't explicitly set #3386
2533 * docs; custom validator examples #2778
2534
25354.1.8 / 2015-09-21
2536==================
2537 * docs; fixed typo in example #3390 [kmctown](https://github.com/kmctown)
2538 * fixed; error in toObject() #3387 [guumaster](https://github.com/guumaster)
2539 * fixed; handling for casting null dates #3383 [alexmingoia](https://github.com/alexmingoia)
2540 * fixed; passing composite ids to `findByIdAndUpdate` #3380
2541 * fixed; linting #3376 #3375 [ChristianMurphy](https://github.com/ChristianMurphy)
2542 * fixed; added NodeJS v4 to Travis #3374 [ChristianMurphy](https://github.com/ChristianMurphy)
2543 * fixed; casting $elemMatch inside of $not #3373 [gaguirre](https://github.com/gaguirre)
2544 * fixed; handle case where $slice is 0 #3369
2545 * fixed; avoid running getters if path is populated #3357
2546 * fixed; cast documents to objects when setting to a nested path #3346
2547
25484.1.7 / 2015-09-14
2549==================
2550 * docs; typos in SchemaType documentation #3367 [jasson15](https://github.com/jasson15)
2551 * fixed; MONGOOSE_DRIVER_PATH env variable again #3360
2552 * docs; added validateSync docs #3353
2553 * fixed; set findOne op synchronously in query #3344
2554 * fixed; handling for `.pull()` on a documentarray without an id #3341
2555 * fixed; use natural order for cloning update conditions #3338
2556 * fixed; issue with strict mode casting for mixed type updates #3337
2557
25584.1.6 / 2015-09-08
2559==================
2560 * fixed; MONGOOSE_DRIVER_PATH env variable #3345 [g13013](https://github.com/g13013)
2561 * docs; global autoIndex option #3335 [albertorestifo](https://github.com/albertorestifo)
2562 * docs; model documentation typos #3330
2563 * fixed; report reason for CastError #3320
2564 * fixed; .populate() no longer returns true after re-assigning #3308
2565 * fixed; discriminators with aggregation geoNear #3304
2566 * docs; discriminator docs #2743
2567
25684.1.5 / 2015-09-01
2569==================
2570 * fixed; document.remove() removing all docs #3326 #3325
2571 * fixed; connect() checks for rs_name in options #3299
2572 * docs; examples for schema.set() #3288
2573 * fixed; checkKeys issue with bluebird #3286 [gregthegeek](https://github.com/gregthegeek)
2574
25754.1.4 / 2015-08-31
2576==================
2577 * fixed; ability to set strict: false for update #3305
2578 * fixed; .create() properly uses ES6 promises #3297
2579 * fixed; pre hooks on nested subdocs #3291 #3284 [aliatsis](https://github.com/aliatsis)
2580 * docs; remove unclear text in .remove() docs #3282
2581 * fixed; pre hooks called twice for 3rd-level nested doc #3281
2582 * fixed; nested transforms #3279
2583 * upgraded; mquery -> 1.6.3 #3278 #3272
2584 * fixed; don't swallow callback errors by default #3273 #3222
2585 * fixed; properly get nested paths from nested schemas #3265
2586 * fixed; remove() with id undefined deleting all docs #3260 [thanpolas](https://github.com/thanpolas)
2587 * fixed; handling for non-numeric projections #3256
2588 * fixed; findById with id undefined returning first doc #3255
2589 * fixed; use retainKeyOrder for update #3215
2590 * added; passRawResult option to findOneAndUpdate for backwards compat #3173
2591
25924.1.3 / 2015-08-16
2593==================
2594 * fixed; getUpdate() in pre update hooks #3520 [gregthegeek](https://github.com/gregthegeek)
2595 * fixed; handleArray() ensures arg is an array #3238 [jloveridge](https://github.com/jloveridge)
2596 * fixed; refresh required path cache when recreating docs #3199
2597 * fixed; $ operator on unwind aggregation helper #3197
2598 * fixed; findOneAndUpdate() properly returns raw result as third arg to callback #3173
2599 * fixed; querystream with dynamic refs #3108
2600
26013.8.35 / 2015-08-14
2602===================
2603 * fixed; handling for minimize on nested objects #2930
2604 * fixed; don't crash when schema.path.options undefined #1824
2605
26064.1.2 / 2015-08-10
2607==================
2608 * fixed; better handling for Jade templates #3241 [kbadk](https://github.com/kbadk)
2609 * added; ESlint trailing spaces #3234 [ChristianMurphy](https://github.com/ChristianMurphy)
2610 * added; ESlint #3191 [ChristianMurphy](https://github.com/ChristianMurphy)
2611 * fixed; properly emit event on disconnect #3183
2612 * fixed; copy options properly using Query.toConstructor() #3176
2613 * fixed; setMaxListeners() issue in browser build #3170
2614 * fixed; node driver -> 2.0.40 to not store undefined keys as null #3169
2615 * fixed; update validators handle positional operator #3167
2616 * fixed; handle $all + $elemMatch query casting #3163
2617 * fixed; post save hooks don't swallow extra args #3155
2618 * docs; spelling mistake in index.jade #3154
2619 * fixed; don't crash when toObject() has no fields #3130
2620 * fixed; apply toObject() recursively for find and update queries #3086 [naoina](https://github.com/naoina)
2621
26224.1.1 / 2015-08-03
2623==================
2624 * fixed; aggregate exec() crash with no callback #3212 #3198 [jpgarcia](https://github.com/jpgarcia)
2625 * fixed; pre init hooks now properly synchronous #3207 [burtonjc](https://github.com/burtonjc)
2626 * fixed; updateValidators doesn't flatten dates #3206 #3194 [victorkohl](https://github.com/victorkohl)
2627 * fixed; default fields don't make document dirty between saves #3205 [burtonjc](https://github.com/burtonjc)
2628 * fixed; save passes 0 as numAffected rather than undefined when no change #3195 [burtonjc](https://github.com/burtonjc)
2629 * fixed; better handling for positional operator in update #3185
2630 * fixed; use Travis containers #3181 [ChristianMurphy](https://github.com/ChristianMurphy)
2631 * fixed; leaked variable #3180 [ChristianMurphy](https://github.com/ChristianMurphy)
2632
26334.1.0 / 2015-07-24
2634==================
2635 * added; `schema.queue()` now public #3193
2636 * added; raw result as third parameter to findOneAndX callback #3173
2637 * added; ability to run validateSync() on only certain fields #3153
2638 * added; subPopulate #3103 [timbur](https://github.com/timbur)
2639 * added; $isDefault function on documents #3077
2640 * added; additional properties for built-in validator messages #3063 [KLicheR](https://github.com/KLicheR)
2641 * added; getQuery() and getUpdate() functions for Query #3013
2642 * added; export DocumentProvider #2996
2643 * added; ability to remove path from schema #2993 [JohnnyEstilles](https://github.com/JohnnyEstilles)
2644 * added; .explain() helper for aggregate #2714
2645 * added; ability to specify which ES6-compatible promises library mongoose uses #2688
2646 * added; export Aggregate #1910
2647
26484.0.8 / 2015-07-20
2649==================
2650 * fixed; assignment with document arrays #3178 [rosston](https://github.com/rosston)
2651 * docs; remove duplicate paragraph #3164 [rhmeeuwisse](https://github.com/rhmeeuwisse)
2652 * docs; improve findOneAndXYZ parameter descriptions #3159 [rhmeeuwisse](https://github.com/rhmeeuwisse)
2653 * docs; add findOneAndRemove to list of supported middleware #3158
2654 * docs; clarify ensureIndex #3156
2655 * fixed; refuse to save/remove document without id #3118
2656 * fixed; hooks next() no longer accidentally returns promise #3104
2657 * fixed; strict mode for findOneAndUpdate #2947
2658 * added; .min.js.gz file for browser component #2806
2659
26603.8.34 / 2015-07-20
2661===================
2662 * fixed; allow using $rename #3171
2663 * fixed; no longer modifies update arguments #3008
2664
26654.0.7 / 2015-07-11
2666==================
2667 * fixed; documentarray id method when using object id #3157 [siboulet](https://github.com/siboulet)
2668 * docs; improve findById docs #3147
2669 * fixed; update validators handle null properly #3136 [odeke-em](https://github.com/odeke-em)
2670 * docs; jsdoc syntax errors #3128 [rhmeeuwisse](https://github.com/rhmeeuwisse)
2671 * docs; fix typo #3126 [rhmeeuwisse](https://github.com/rhmeeuwisse)
2672 * docs; proper formatting in queries.jade #3121 [rhmeeuwisse](https://github.com/rhmeeuwisse)
2673 * docs; correct example for string maxlength validator #3111 [rhmeeuwisse](https://github.com/rhmeeuwisse)
2674 * fixed; setDefaultsOnInsert with arrays #3107
2675 * docs; LearnBoost -> Automattic in package.json #3099
2676 * docs; pre update hook example #3094 [danpe](https://github.com/danpe)
2677 * docs; clarify query middleware example #3051
2678 * fixed; ValidationErrors in strict mode #3046
2679 * fixed; set findOneAndUpdate properties before hooks run #3024
2680
26813.8.33 / 2015-07-10
2682===================
2683 * upgraded; node driver -> 1.4.38
2684 * fixed; dont crash when `match` validator undefined
2685
26864.0.6 / 2015-06-21
2687==================
2688 * upgraded; node driver -> 2.0.34 #3087
2689 * fixed; apply setters on addToSet, etc #3067 [victorkohl](https://github.com/victorkohl)
2690 * fixed; missing semicolons #3065 [sokolikp](https://github.com/sokolikp)
2691 * fixed; proper handling for async doc hooks #3062 [gregthegeek](https://github.com/gregthegeek)
2692 * fixed; dont set failed populate field to null if other docs are successfully populated #3055 [eloytoro](https://github.com/eloytoro)
2693 * fixed; setDefaultsOnInsert with document arrays #3034 [taxilian](https://github.com/taxilian)
2694 * fixed; setters fired on array items #3032
2695 * fixed; stop validateSync() on first error #3025 [victorkohl](https://github.com/victorkohl)
2696 * docs; improve query docs #3016
2697 * fixed; always exclude _id when its deselected #3010
2698 * fixed; enum validator kind property #3009
2699 * fixed; mquery collection names #3005
2700 * docs; clarify mongos option #3000
2701 * docs; clarify that query builder has a .then() #2995
2702 * fixed; race condition in dynamic ref #2992
2703
27043.8.31 / 2015-06-20
2705===================
2706 * fixed; properly handle text search with discriminators and $meta #2166
2707
27084.0.5 / 2015-06-05
2709==================
2710 * fixed; ObjectIds and buffers when mongodb driver is a sibling dependency #3050 #3048 #3040 #3031 #3020 #2988 #2951
2711 * fixed; warn user when 'increment' is used in schema #3039
2712 * fixed; setDefaultsOnInsert with array in schema #3035
2713 * fixed; dont use default Object toString to cast to string #3030
2714 * added; npm badge #3020 [odeke-em](https://github.com/odeke-em)
2715 * fixed; proper handling for calling .set() with a subdoc #2782
2716 * fixed; dont throw cast error when using $rename on non-string path #1845
2717
27183.8.30 / 2015-06-05
2719===================
2720 * fixed; enable users to set all options with tailable() #2883
2721
27224.0.4 / 2015-05-28
2723==================
2724 * docs; findAndModify new parameter correct default value #3012 [JonForest](https://github.com/JonForest)
2725 * docs; clarify pluralization rules #2999 [anonmily](https://github.com/anonmily)
2726 * fix; discriminators with schema methods #2978
2727 * fix; make `isModified` a schema reserved keyword #2975
2728 * fix; properly fire setters when initializing path with object #2943
2729 * fix; can use `setDefaultsOnInsert` without specifying `runValidators` #2938
2730 * fix; always set validation errors `kind` property #2885
2731 * upgraded; node driver -> 2.0.33 #2865
2732
27333.8.29 / 2015-05-27
2734===================
2735 * fixed; Handle JSON.stringify properly for nested docs #2990
2736
27374.0.3 / 2015-05-13
2738==================
2739 * upgraded; mquery -> 1.5.1 #2983
2740 * docs; clarify context for query middleware #2974
2741 * docs; fix missing type -> kind rename in History.md #2961
2742 * fixed; broken ReadPreference include on Heroku #2957
2743 * docs; correct form for cursor aggregate option #2955
2744 * fixed; sync post hooks now properly called after function #2949 #2925
2745 * fixed; fix sub-doc validate() function #2929
2746 * upgraded; node driver -> 2.0.30 #2926
2747 * docs; retainKeyOrder for save() #2924
2748 * docs; fix broken class names #2913
2749 * fixed; error when using node-clone on a doc #2909
2750 * fixed; no more hard references to bson #2908 #2906
2751 * fixed; dont overwrite array values #2907 [naoina](https://github.com/naoina)
2752 * fixed; use readPreference=primary for findOneAndUpdate #2899 #2823
2753 * docs; clarify that update validators only run on $set and $unset #2889
2754 * fixed; set kind consistently for built-in validators #2885
2755 * docs; single field populated documents #2884
2756 * fixed; nested objects are now enumerable #2880 [toblerpwn](https://github.com/toblerpwn)
2757 * fixed; properly populate field when ref, lean, stream used together #2841
2758 * docs; fixed migration guide jade error #2807
2759
27603.8.28 / 2015-05-12
2761===================
2762 * fixed; proper handling for toJSON options #2910
2763 * fixed; dont attach virtuals to embedded docs in update() #2046
2764
27654.0.2 / 2015-04-23
2766==================
2767 * fixed; error thrown when calling .validate() on subdoc not in an array #2902
2768 * fixed; rename define() to play nice with webpack #2900 [jspears](https://github.com/jspears)
2769 * fixed; pre validate called twice with discriminators #2892
2770 * fixed; .inspect() on mongoose.Types #2875
2771 * docs; correct callback params for Model.update #2872
2772 * fixed; setDefaultsOnInsert now works when runValidators not specified #2870
2773 * fixed; Document now wraps EventEmitter.addListener #2867
2774 * fixed; call non-hook functions in schema queue #2856
2775 * fixed; statics can be mocked out for tests #2848 [ninelb](https://github.com/ninelb)
2776 * upgraded; mquery 1.4.0 for bluebird bug fix #2846
2777 * fixed; required validators run first #2843
2778 * docs; improved docs for new option to findAndMody #2838
2779 * docs; populate example now uses correct field #2837 [swilliams](https://github.com/swilliams)
2780 * fixed; pre validate changes causing VersionError #2835
2781 * fixed; get path from correct place when setting CastError #2832
2782 * docs; improve docs for Model.update() function signature #2827 [irnc](https://github.com/irnc)
2783 * fixed; populating discriminators #2825 [chetverikov](https://github.com/chetverikov)
2784 * fixed; discriminators with nested schemas #2821
2785 * fixed; CastErrors with embedded docs #2819
2786 * fixed; post save hook context #2816
2787 * docs; 3.8.x -> 4.x migration guide #2807
2788 * fixed; proper _distinct copying for query #2765 [cdelauder](https://github.com/cdelauder)
2789
27903.8.27 / 2015-04-22
2791===================
2792 * fixed; dont duplicate db calls on Q.ninvoke() #2864
2793 * fixed; Model.find arguments naming in docs #2828
2794 * fixed; Support ipv6 in connection strings #2298
2795
27963.8.26 / 2015-04-07
2797===================
2798 * fixed; TypeError when setting date to undefined #2833
2799 * fixed; handle CastError properly in distinct() with no callback #2786
2800 * fixed; broken links in queries docs #2779
2801 * fixed; dont mark buffer as modified when setting type initially #2738
2802 * fixed; dont crash when using slice with populate #1934
2803
28044.0.1 / 2015-03-28
2805==================
2806 * fixed; properly handle empty cast doc in update() with promises #2796
2807 * fixed; unstable warning #2794
2808 * fixed; findAndModify docs now show new option is false by default #2793
2809
28104.0.0 / 2015-03-25
2811==================
2812 * fixed; on-the-fly schema docs typo #2783 [artiifix](https://github.com/artiifix)
2813 * fixed; cast error validation handling #2775 #2766 #2678
2814 * fixed; discriminators with populate() #2773 #2719 [chetverikov](https://github.com/chetverikov)
2815 * fixed; increment now a reserved path #2709
2816 * fixed; avoid sending duplicate object ids in populate() #2683
2817 * upgraded; mongodb to 2.0.24 to properly emit reconnect event multiple times #2656
2818
28194.0.0-rc4 / 2015-03-14
2820======================
2821 * fixed; toObject virtuals schema option handled properly #2751
2822 * fixed; update validators work on document arrays #2733
2823 * fixed; check for cast errors on $set #2729
2824 * fixed; instance field set for all schema types #2727 [csdco](https://github.com/csdco)
2825 * fixed; dont run other validators if required fails #2725
2826 * fixed; custom getters execute on ref paths #2610
2827 * fixed; save defaults if they were set when doc was loaded from db #2558
2828 * fixed; pre validate now runs before pre save #2462
2829 * fixed; no longer throws errors with --use_strict #2281
2830
28313.8.25 / 2015-03-13
2832===================
2833 * fixed; debug output reverses order of aggregation keys #2759
2834 * fixed; $eq is a valid query selector in 3.0 #2752
2835 * fixed; upgraded node driver to 1.4.32 for handling non-numeric poolSize #2682
2836 * fixed; update() with overwrite sets _id for nested docs #2658
2837 * fixed; casting for operators in $elemMatch #2199
2838
28394.0.0-rc3 / 2015-02-28
2840======================
2841 * fixed; update() pre hooks run before validators #2706
2842 * fixed; setters not called on arrays of refs #2698 [brandom](https://github.com/brandom)
2843 * fixed; use node driver 2.0.18 for nodejs 0.12 support #2685
2844 * fixed; comments reference file that no longer exists #2681
2845 * fixed; populated() returns _id of manually populated doc #2678
2846 * added; ability to exclude version key in toObject() #2675
2847 * fixed; dont allow setting nested path to a string #2592
2848 * fixed; can cast objects with _id field to ObjectIds #2581
2849 * fixed; on-the-fly schema getters #2360
2850 * added; strict option for findOneAndUpdate() #1967
2851
28523.8.24 / 2015-02-25
2853===================
2854 * fixed; properly apply child schema transforms #2691
2855 * fixed; make copy of findOneAndUpdate options before modifying #2687
2856 * fixed; apply defaults when parent path is selected #2670 #2629
2857 * fixed; properly get ref property for nested paths #2665
2858 * fixed; node driver makes copy of authenticate options before modifying them #2619
2859 * fixed; dont block process exit when auth fails #2599
2860 * fixed; remove redundant clone in update() #2537
2861
28624.0.0-rc2 / 2015-02-10
2863======================
2864 * added; io.js to travis build
2865 * removed; browser build dependencies not installed by default
2866 * added; dynamic refpaths #2640 [chetverikov](https://github.com/chetverikov)
2867 * fixed; dont call child schema transforms on parent #2639 [chetverikov](https://github.com/chetverikov)
2868 * fixed; get rid of remove option if new is set in findAndModify #2598
2869 * fixed; aggregate all document array validation errors #2589
2870 * fixed; custom setters called when setting value to undefined #1892
2871
28723.8.23 / 2015-02-06
2873===================
2874 * fixed; unset opts.remove when upsert is true #2519
2875 * fixed; array saved as object when path is object in array #2442
2876 * fixed; inline transforms #2440
2877 * fixed; check for callback in count() #2204
2878 * fixed; documentation for selecting fields #1534
2879
28804.0.0-rc1 / 2015-02-01
2881======================
2882 * fixed; use driver 2.0.14
2883 * changed; use transform: true by default #2245
2884
28854.0.0-rc0 / 2015-01-31
2886===================
2887 * fixed; wrong order for distinct() params #2628
2888 * fixed; handling no query argument to remove() #2627
2889 * fixed; createModel and discriminators #2623 [ashaffer](https://github.com/ashaffer)
2890 * added; pre('count') middleware #2621
2891 * fixed; double validation calls on document arrays #2618
2892 * added; validate() catches cast errors #2611
2893 * fixed; respect replicaSet parameter in connection string #2609
2894 * added; can explicitly exclude paths from versioning #2576 [csabapalfi](https://github.com/csabapalfi)
2895 * upgraded; driver to 2.0.15 #2552
2896 * fixed; save() handles errors more gracefully in ES6 #2371
2897 * fixed; undefined is now a valid argument to findOneAndUpdate #2272
2898 * changed; `new` option to findAndModify ops is false by default #2262
2899
29003.8.22 / 2015-01-24
2901===================
2902 * upgraded; node-mongodb-native to 1.4.28 #2587 [Climax777](https://github.com/Climax777)
2903 * added; additional documentation for validators #2449
2904 * fixed; stack overflow when creating massive arrays #2423
2905 * fixed; undefined is a valid id for queries #2411
2906 * fixed; properly create nested schema index when same schema used twice #2322
2907 * added; link to plugin generator in docs #2085 [huei90](https://github.com/huei90)
2908 * fixed; optional arguments documentation for findOne() #1971 [nachinius](https://github.com/nachinius)
2909
29103.9.7 / 2014-12-19
2911===================
2912 * added; proper cursors for aggregate #2539 [changyy](https://github.com/changyy)
2913 * added; min/max built-in validators for dates #2531 [bshamblen](https://github.com/bshamblen)
2914 * fixed; save and validate are now reserved keywords #2380
2915 * added; basic documentation for browser component #2256
2916 * added; find and findOne hooks (query middleware) #2138
2917 * fixed; throw a DivergentArrayError when saving positional operator queries #2031
2918 * added; ability to use options as a document property #1416
2919 * fixed; document no longer inherits from event emitter and so domain and _events are no longer reserved #1351
2920 * removed; setProfiling #1349
2921
29223.8.21 / 2014-12-18
2923===================
2924 * fixed; syntax in index.jade #2517 [elderbas](https://github.com/elderbas)
2925 * fixed; writable statics #2510 #2528
2926 * fixed; overwrite and explicit $set casting #2515
2927
29283.9.6 / 2014-12-05
2929===================
2930 * added; correctly run validators on each element of array when entire array is modified #661 #1227
2931 * added; castErrors in validation #1013 [jondavidjohn](https://github.com/jondavidjohn)
2932 * added; specify text indexes in schema fields #1401 [sr527](https://github.com/sr527)
2933 * added; ability to set field with validators to undefined #1594 [alabid](https://github.com/alabid)
2934 * added; .create() returns an array when passed an array #1746 [alabid](https://github.com/alabid)
2935 * added; test suite and docs for use with co and yield #2177 #2474
2936 * fixed; subdocument toObject() transforms #2447 [chmanie](https://github.com/chmanie)
2937 * fixed; Model.create() with save errors #2484
2938 * added; pass options to .save() and .remove() #2494 [jondavidjohn](https://github.com/jondavidjohn)
2939
29403.8.20 / 2014-12-01
2941===================
2942 * fixed; recursive readPref #2490 [kjvalencik](https://github.com/kjvalencik)
2943 * fixed; make sure to copy parameters to update() before modifying #2406 [alabid](https://github.com/alabid)
2944 * fixed; unclear documentation about query callbacks #2319
2945 * fixed; setting a schema-less field to an empty object #2314 [alabid](https://github.com/alabid)
2946 * fixed; registering statics and methods for discriminators #2167 [alabid](https://github.com/alabid)
2947
29483.9.5 / 2014-11-10
2949===================
2950 * added; ability to disable autoIndex on a per-connection basis #1875 [sr527](https://github.com/sr527)
2951 * fixed; `geoNear()` no longer enforces legacy coordinate pairs - supports GeoJSON #1987 [alabid](https://github.com/alabid)
2952 * fixed; browser component works when minified with mangled variable names #2302
2953 * fixed; `doc.errors` now cleared before `validate()` called #2302
2954 * added; `execPopulate()` function to make `doc.populate()` compatible with promises #2317
2955 * fixed; `count()` no longer throws an error when used with `sort()` #2374
2956 * fixed; `save()` no longer recursively calls `save()` on populated fields #2418
2957
29583.8.19 / 2014-11-09
2959===================
2960 * fixed; make sure to not override subdoc _ids on find #2276 [alabid](https://github.com/alabid)
2961 * fixed; exception when comparing two documents when one lacks _id #2333 [slawo](https://github.com/slawo)
2962 * fixed; getters for properties with non-strict schemas #2439 [alabid](https://github.com/alabid)
2963 * fixed; inconsistent URI format in docs #2414 [sr527](https://github.com/sr527)
2964
29653.9.4 / 2014-10-25
2966==================
2967 * fixed; statics no longer can be overwritten #2343 [nkcmr](https://github.com/chetverikov)
2968 * added; ability to set single populated paths to documents #1530
2969 * added; setDefaultsOnInsert and runValidator options for findOneAndUpdate() #860
2970
29713.8.18 / 2014-10-22
2972==================
2973 * fixed; Dont use all toObject options in save #2340 [chetverikov](https://github.com/chetverikov)
2974
29753.9.3 / 2014-10-01
2976=================
2977 * added; support for virtuals that return objects #2294
2978 * added; ability to manually hydrate POJOs into mongoose objects #2292
2979 * added; setDefaultsOnInsert and runValidator options for update() #860
2980
29813.8.17 / 2014-09-29
2982==================
2983 * fixed; use schema options retainKeyOrder in save() #2274
2984 * fixed; fix skip in populate when limit is set #2252
2985 * fixed; fix stack overflow when passing MongooseArray to findAndModify #2214
2986 * fixed; optimize .length usage in populate #2289
2987
29883.9.2 / 2014-09-08
2989==================
2990 * added; test coverage for browser component #2255
2991 * added; in-order execution of validators #2243
2992 * added; custom fields for validators #2132
2993 * removed; exception thrown when find() used with count() #1950
2994
29953.8.16 / 2014-09-08
2996==================
2997 * fixed; properly remove modified array paths if array has been overwritten #1638
2998 * fixed; key check errors #1884
2999 * fixed; make sure populate on an array always returns a Mongoose array #2214
3000 * fixed; SSL connections with node 0.11 #2234
3001 * fixed; return sensible strings for promise errors #2239
3002
30033.9.1 / 2014-08-17
3004==================
3005 * added; alpha version of browser-side schema validation #2254
3006 * added; support passing a function to schemas `required` field #2247
3007 * added; support for setting updatedAt and createdAt timestamps #2227
3008 * added; document.validate() returns a promise #2131
3009
30103.8.15 / 2014-08-17
3011==================
3012 * fixed; Replica set connection string example in docs #2246
3013 * fixed; bubble up parseError event #2229
3014 * fixed; removed buggy populate cache #2176
3015 * fixed; dont $inc versionKey if its being $set #1933
3016 * fixed; cast $or and $and in $pull #1932
3017 * fixed; properly cast to schema in stream() #1862
3018 * fixed; memory leak in nested objects #1565 #2211 [devongovett](https://github.com/devongovett)
3019
30203.8.14 / 2014-07-26
3021==================
3022 * fixed; stringifying MongooseArray shows nested arrays #2002
3023 * fixed; use populated doc schema in toObject and toJSON by default #2035
3024 * fixed; dont crash on arrays containing null #2140
3025 * fixed; model.update w/ upsert has same return values on .exec and promise #2143
3026 * fixed; better handling for populate limit with multiple documents #2151
3027 * fixed; dont prevent users from adding weights to text index #2183
3028 * fixed; helper for aggregation cursor #2187
3029 * updated; node-mongodb-native to 1.4.7
3030
30313.8.13 / 2014-07-15
3032==================
3033 * fixed; memory leak with isNew events #2159
3034 * fixed; docs for overwrite option for update() #2144
3035 * fixed; storeShard() handles dates properly #2127
3036 * fixed; sub-doc changes not getting persisted to db after save #2082
3037 * fixed; populate with _id: 0 actually removes _id instead of setting to undefined #2123
3038 * fixed; save versionKey on findOneAndUpdate w/ upsert #2122
3039 * fixed; fix typo in 2.8 docs #2120 [shakirullahi](https://github.com/shakirullahi)
3040 * fixed; support maxTimeMs #2102 [yuukinajima](https://github.com/yuukinajima)
3041 * fixed; support $currentDate #2019
3042 * fixed; $addToSet handles objects without _ids properly #1973
3043 * fixed; dont crash on invalid nearSphere query #1874
3044
30453.8.12 / 2014-05-30
3046==================
3047 * fixed; single-server reconnect event fires #1672
3048 * fixed; sub-docs not saved when pushed into populated array #1794
3049 * fixed; .set() sometimes converts embedded docs to pojos #1954 [archangel-irk](https://github.com/archangel-irk)
3050 * fixed; sub-doc changes not getting persisted to db after save #2082
3051 * fixed; custom getter might cause mongoose to mistakenly think a path is dirty #2100 [pgherveou](https://github.com/pgherveou)
3052 * fixed; chainable helper for allowDiskUse option in aggregation #2114
3053
30543.9.0 (unstable) / 2014-05-22
3055==================
3056 * changed; added `domain` to reserved keywords #1338 #2052 [antoinepairet](https://github.com/antoinepairet)
3057 * added; asynchronous post hooks #1977 #2081 [chopachom](https://github.com/chopachom) [JasonGhent](https://github.com/JasonGhent)
3058 * added; using model for population, cross-db populate [mihai-chiorean](https://github.com/mihai-chiorean)
3059 * added; can define a type for schema validators
3060 * added; `doc.remove()` returns a promise #1619 [refack](https://github.com/refack)
3061 * added; internal promises for hooks, pre-save hooks run in parallel #1732 [refack](https://github.com/refack)
3062 * fixed; geoSearch hanging when no results returned #1846 [ghartnett](https://github.com/ghartnett)
3063 * fixed; do not set .type property on ValidationError, use .kind instead #1323
3064
30653.8.11 / 2014-05-22
3066==================
3067 * updated; node-mongodb-native to 1.4.5
3068 * reverted; #2052, fixes #2097
3069
30703.8.10 / 2014-05-20
3071==================
3072
3073 * updated; node-mongodb-native to 1.4.4
3074 * fixed; _.isEqual false negatives bug in js-bson #2070
3075 * fixed; missing check for schema.options #2014
3076 * fixed; missing support for $position #2024
3077 * fixed; options object corruption #2049
3078 * fixed; improvements to virtuals docs #2055
3079 * fixed; added `domain` to reserved keywords #2052 #1338
3080
30813.8.9 / 2014-05-08
3082==================
3083
3084 * updated; mquery to 0.7.0
3085 * updated; node-mongodb-native to 1.4.3
3086 * fixed; $near failing against MongoDB 2.6
3087 * fixed; relying on .options() to determine if collection exists
3088 * fixed; $out aggregate helper
3089 * fixed; all test failures against MongoDB 2.6.1, with caveat #2065
3090
30913.8.8 / 2014-02-22
3092==================
3093
3094 * fixed; saving Buffers #1914
3095 * updated; expose connection states for user-land #1926 [yorkie](https://github.com/yorkie)
3096 * updated; mquery to 0.5.3
3097 * updated; added get / set to reserved path list #1903 [tstrimple](https://github.com/tstrimple)
3098 * docs; README code highlighting, syntax fixes #1930 [IonicaBizau](https://github.com/IonicaBizau)
3099 * docs; fixes link in the doc at #1925 [kapeels](https://github.com/kapeels)
3100 * docs; add a missed word 'hook' for the description of the post-hook api #1924 [ipoval](https://github.com/ipoval)
3101
31023.8.7 / 2014-02-09
3103==================
3104
3105 * fixed; sending safe/read options in Query#exec #1895
3106 * fixed; findOneAnd..() with sort #1887
3107
31083.8.6 / 2014-01-30
3109==================
3110
3111 * fixed; setting readPreferences #1895
3112
31133.8.5 / 2014-01-23
3114==================
3115
3116 * fixed; ssl setting when using URI #1882
3117 * fixed; findByIdAndUpdate now respects the overwrite option #1809 [owenallenaz](https://github.com/owenallenaz)
3118
31193.8.4 / 2014-01-07
3120==================
3121
3122 * updated; mongodb driver to 1.3.23
3123 * updated; mquery to 0.4.1
3124 * updated; mpromise to 0.4.3
3125 * fixed; discriminators now work when selecting fields #1820 [daemon1981](https://github.com/daemon1981)
3126 * fixed; geoSearch with no results timeout #1846 [ghartnett](https://github.com/ghartnett)
3127 * fixed; infitite recursion in ValidationError #1834 [chetverikov](https://github.com/chetverikov)
3128
31293.8.3 / 2013-12-17
3130==================
3131
3132 * fixed; setting empty array with model.update #1838
3133 * docs; fix url
3134
31353.8.2 / 2013-12-14
3136==================
3137
3138 * fixed; enum validation of multiple values #1778 [heroicyang](https://github.com/heroicyang)
3139 * fixed; global var leak #1803
3140 * fixed; post remove now fires on subdocs #1810
3141 * fixed; no longer set default empty array for geospatial-indexed fields #1668 [shirish87](https://github.com/shirish87)
3142 * fixed; model.stream() not hydrating discriminators correctly #1792 [j](https://github.com/j)
3143 * docs: Stablility -> Stability [nikmartin](https://github.com/nikmartin)
3144 * tests; improve shard error handling
3145
31463.8.1 / 2013-11-19
3147==================
3148
3149 * fixed; mishandling of Dates with minimize/getters #1764
3150 * fixed; Normalize bugs.email, so `npm` will shut up #1769 [refack](https://github.com/refack)
3151 * docs; Improve the grammar where "lets us" was used #1777 [alexyoung](https://github.com/alexyoung)
3152 * docs; Fix some grammatical issues in the documentation #1777 [alexyoung](https://github.com/alexyoung)
3153 * docs; fix Query api exposure
3154 * docs; fix return description
3155 * docs; Added Notes on findAndUpdate() #1750 [sstadelman](https://github.com/sstadelman)
3156 * docs; Update version number in README #1762 [Fodi69](https://github.com/Fodi69)
3157
31583.8.0 / 2013-10-31
3159==================
3160
3161 * updated; warn when using an unstable version
3162 * updated; error message returned in doc.save() #1595
3163 * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
3164 * updated; mquery to 0.3.2
3165 * updated; mocha to 1.12.0
3166 * updated; mpromise 0.3.0
3167 * updated; sliced 0.0.5
3168 * removed; mongoose.Error.DocumentError (never used)
3169 * removed; namedscope (undocumented and broken) #679 #642 #455 #379
3170 * changed; no longer offically supporting node 0.6.x
3171 * changed; query.within getter is now a method -> query.within()
3172 * changed; query.intersects getter is now a method -> query.intersects()
3173 * added; custom error msgs for built-in validators #747
3174 * added; discriminator support #1647 #1003 [j](https://github.com/j)
3175 * added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
3176 * added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
3177 * added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
3178 * added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
3179 * added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
3180 * added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
3181 * added; promise support to model.mapReduce()
3182 * added; promise support to model.ensureIndexes()
3183 * added; promise support to model.populate()
3184 * added; benchmarks [ebensing](https://github.com/ebensing)
3185 * added; publicly exposed connection states #1585
3186 * added; $geoWithin support #1529 $1455 [ebensing](https://github.com/ebensing)
3187 * added; query method chain validation
3188 * added; model.update `overwrite` option
3189 * added; model.geoNear() support #1563 [ebensing](https://github.com/ebensing)
3190 * added; model.geoSearch() support #1560 [ebensing](https://github.com/ebensing)
3191 * added; MongooseBuffer#subtype()
3192 * added; model.create() now returns a promise #1340
3193 * added; support for `awaitdata` query option
3194 * added; pass the doc to doc.remove() callback #1419 [JoeWagner](https://github.com/JoeWagner)
3195 * added; aggregation query builder #1404 [njoyard](https://github.com/njoyard)
3196 * fixed; document.toObject when using `minimize` and `getters` options #1607 [JedWatson](https://github.com/JedWatson)
3197 * fixed; Mixed types can now be required #1722 [Reggino](https://github.com/Reggino)
3198 * fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
3199 * fixed; repopulating modified populated paths #1697
3200 * fixed; doc.equals() when _id option is set to false #1687
3201 * fixed; strict mode warnings #1686
3202 * fixed; $near GeoJSON casting #1683
3203 * fixed; nearSphere GeoJSON query builder
3204 * fixed; population field selection w/ strings #1669
3205 * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
3206 * fixed; handle another versioning edge case #1520
3207 * fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
3208 * fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
3209 * fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
3210 * fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
3211 * fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
3212 * fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
3213 * fixed; model.remove() removes only what is necessary #1649
3214 * fixed; update() now only runs with cb or explicit true #1644
3215 * fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
3216 * fixed; model.update "overwrite" option works as documented
3217 * fixed; query#remove() works as documented
3218 * fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
3219 * fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
3220 * fixed; benchmarks to actually output valid json
3221 * deprecated; promise#addBack (use promise#onResolve)
3222 * deprecated; promise#complete (use promise#fulfill)
3223 * deprecated; promise#addCallback (use promise#onFulFill)
3224 * deprecated; promise#addErrback (use promise#onReject)
3225 * deprecated; query.nearSphere() (use query.near)
3226 * deprecated; query.center() (use query.circle)
3227 * deprecated; query.centerSphere() (use query.circle)
3228 * deprecated; query#slaveOk (use query#read)
3229 * docs; custom validator messages
3230 * docs; 10gen -> MongoDB
3231 * docs; add Date method caveats #1598
3232 * docs; more validation details
3233 * docs; state which branch is stable/unstable
3234 * docs; mention that middleware does not run on Models
3235 * docs; promise.fulfill()
3236 * docs; fix readme spelling #1483 [yorchopolis](https://github.com/yorchopolis)
3237 * docs; fixed up the README and examples [ebensing](https://github.com/ebensing)
3238 * website; add "show code" for properties
3239 * website; move "show code" links down
3240 * website; update guide
3241 * website; add unstable docs
3242 * website; many improvements
3243 * website; fix copyright #1439
3244 * website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
3245 * tests; refactor 1703
3246 * tests; add test generator
3247 * tests; validate formatMessage() throws
3248 * tests; add script for continuously running tests
3249 * tests; fixed versioning tests
3250 * tests; race conditions in tests
3251 * tests; added for nested and/or queries
3252 * tests; close some test connections
3253 * tests; validate db contents
3254 * tests; remove .only
3255 * tests; close some test connections
3256 * tests; validate db contents
3257 * tests; remove .only
3258 * tests; replace deprecated method names
3259 * tests; convert id to string
3260 * tests; fix sharding tests for MongoDB 2.4.5
3261 * tests; now 4-5 seconds faster
3262 * tests; fix race condition
3263 * make; suppress warning msg in test
3264 * benchmarks; updated for pull requests
3265 * examples; improved and expanded [ebensing](https://github.com/ebensing)
3266
32673.7.4 (unstable) / 2013-10-01
3268=============================
3269
3270 * updated; mquery to 0.3.2
3271 * removed; mongoose.Error.DocumentError (never used)
3272 * added; custom error msgs for built-in validators #747
3273 * added; discriminator support #1647 #1003 [j](https://github.com/j)
3274 * added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
3275 * fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
3276 * fixed; repopulating modified populated paths #1697
3277 * fixed; doc.equals() when _id option is set to false #1687
3278 * fixed; strict mode warnings #1686
3279 * fixed; $near GeoJSON casting #1683
3280 * fixed; nearSphere GeoJSON query builder
3281 * fixed; population field selection w/ strings #1669
3282 * docs; custom validator messages
3283 * docs; 10gen -> MongoDB
3284 * docs; add Date method caveats #1598
3285 * docs; more validation details
3286 * website; add "show code" for properties
3287 * website; move "show code" links down
3288 * tests; refactor 1703
3289 * tests; add test generator
3290 * tests; validate formatMessage() throws
3291
32923.7.3 (unstable) / 2013-08-22
3293=============================
3294
3295 * updated; warn when using an unstable version
3296 * updated; mquery to 0.3.1
3297 * updated; mocha to 1.12.0
3298 * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
3299 * changed; no longer offically supporting node 0.6.x
3300 * added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
3301 * added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
3302 * added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
3303 * added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
3304 * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
3305 * fixed; handle another versioning edge case #1520
3306 * fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
3307 * fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
3308 * fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
3309 * fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
3310 * fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
3311 * fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
3312 * make; suppress warning msg in test
3313 * docs; state which branch is stable/unstable
3314 * docs; mention that middleware does not run on Models
3315 * tests; add script for continuously running tests
3316 * tests; fixed versioning tests
3317 * benchmarks; updated for pull requests
3318
33193.7.2 (unstable) / 2013-08-15
3320==================
3321
3322 * fixed; model.remove() removes only what is necessary #1649
3323 * fixed; update() now only runs with cb or explicit true #1644
3324 * tests; race conditions in tests
3325 * website; update guide
3326
33273.7.1 (unstable) / 2013-08-13
3328=============================
3329
3330 * updated; driver to 1.3.18 (fixes memory leak)
3331 * added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
3332 * added; promise support to model.mapReduce()
3333 * added; promise support to model.ensureIndexes()
3334 * added; promise support to model.populate()
3335 * fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
3336 * fixed; model.update "overwrite" option works as documented
3337 * fixed; query#remove() works as documented
3338 * fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
3339 * fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
3340 * fixed; benchmarks to actually output valid json
3341 * tests; added for nested and/or queries
3342 * tests; close some test connections
3343 * tests; validate db contents
3344 * tests; remove .only
3345 * tests; close some test connections
3346 * tests; validate db contents
3347 * tests; remove .only
3348 * tests; replace deprecated method names
3349 * tests; convert id to string
3350 * docs; promise.fulfill()
3351
33523.7.0 (unstable) / 2013-08-05
3353===================
3354
3355 * changed; query.within getter is now a method -> query.within()
3356 * changed; query.intersects getter is now a method -> query.intersects()
3357 * deprecated; promise#addBack (use promise#onResolve)
3358 * deprecated; promise#complete (use promise#fulfill)
3359 * deprecated; promise#addCallback (use promise#onFulFill)
3360 * deprecated; promise#addErrback (use promise#onReject)
3361 * deprecated; query.nearSphere() (use query.near)
3362 * deprecated; query.center() (use query.circle)
3363 * deprecated; query.centerSphere() (use query.circle)
3364 * deprecated; query#slaveOk (use query#read)
3365 * removed; namedscope (undocumented and broken) #679 #642 #455 #379
3366 * added; benchmarks [ebensing](https://github.com/ebensing)
3367 * added; publicly exposed connection states #1585
3368 * added; $geoWithin support #1529 $1455 [ebensing](https://github.com/ebensing)
3369 * added; query method chain validation
3370 * added; model.update `overwrite` option
3371 * added; model.geoNear() support #1563 [ebensing](https://github.com/ebensing)
3372 * added; model.geoSearch() support #1560 [ebensing](https://github.com/ebensing)
3373 * added; MongooseBuffer#subtype()
3374 * added; model.create() now returns a promise #1340
3375 * added; support for `awaitdata` query option
3376 * added; pass the doc to doc.remove() callback #1419 [JoeWagner](https://github.com/JoeWagner)
3377 * added; aggregation query builder #1404 [njoyard](https://github.com/njoyard)
3378 * updated; integrate mquery #1562 [ebensing](https://github.com/ebensing)
3379 * updated; error msg in doc.save() #1595
3380 * updated; bump driver to 1.3.15
3381 * updated; mpromise 0.3.0
3382 * updated; sliced 0.0.5
3383 * tests; fix sharding tests for MongoDB 2.4.5
3384 * tests; now 4-5 seconds faster
3385 * tests; fix race condition
3386 * docs; fix readme spelling #1483 [yorchopolis](https://github.com/yorchopolis)
3387 * docs; fixed up the README and examples [ebensing](https://github.com/ebensing)
3388 * website; add unstable docs
3389 * website; many improvements
3390 * website; fix copyright #1439
3391 * website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
3392 * examples; improved and expanded [ebensing](https://github.com/ebensing)
3393
33943.6.20 (stable) / 2013-09-23
3395===================
3396
3397 * fixed; repopulating modified populated paths #1697
3398 * fixed; doc.equals w/ _id false #1687
3399 * fixed; strict mode warning #1686
3400 * docs; near/nearSphere
3401
34023.6.19 (stable) / 2013-09-04
3403==================
3404
3405 * fixed; population field selection w/ strings #1669
3406 * docs; Date method caveats #1598
3407
34083.6.18 (stable) / 2013-08-22
3409===================
3410
3411 * updated; warn when using an unstable version of mongoose
3412 * updated; mocha to 1.12.0
3413 * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
3414 * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
3415 * fixed; properly exclude subdocument fields #1280 [ebensing](https://github.com/ebensing)
3416 * fixed; cast error in findAndModify #1643 [aheuermann](https://github.com/aheuermann)
3417 * website; update guide
3418 * website; added documentation for safe:false and versioning interaction
3419 * docs; mention that middleware dont run on Models
3420 * docs; fix indexes link
3421 * make; suppress warning msg in test
3422 * tests; moar
3423
34243.6.17 / 2013-08-13
3425===================
3426
3427 * updated; driver to 1.3.18 (fixes memory leak)
3428 * fixed; casting ref docs on creation #1606
3429 * docs; query options
3430
34313.6.16 / 2013-08-08
3432===================
3433
3434 * added; publicly expose connection states #1585
3435 * fixed; limit applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
3436 * fixed; positional operator casting in updates #1572 [ebensing](https://github.com/ebensing)
3437 * updated; MongoDB driver to 1.3.17
3438 * updated; sliced to 0.0.5
3439 * website; tweak homepage
3440 * tests; fixed + added
3441 * docs; fix some examples
3442 * docs; multi-mongos support details
3443 * docs; auto open browser after starting static server
3444
34453.6.15 / 2013-07-16
3446==================
3447
3448 * added; mongos failover support #1037
3449 * updated; make schematype return vals return self #1580
3450 * docs; add note to model.update #571
3451 * docs; document third param to document.save callback #1536
3452 * tests; tweek mongos test timeout
3453
34543.6.14 / 2013-07-05
3455===================
3456
3457 * updated; driver to 1.3.11
3458 * fixed; issue with findOneAndUpdate not returning null on upserts #1533 [ebensing](https://github.com/ebensing)
3459 * fixed; missing return statement in SchemaArray#$geoIntersects() #1498 [bsrykt](https://github.com/bsrykt)
3460 * fixed; wrong isSelected() behavior #1521 [kyano](https://github.com/kyano)
3461 * docs; note about toObject behavior during save()
3462 * docs; add callbacks details #1547 [nikmartin](https://github.com/nikmartin)
3463
34643.6.13 / 2013-06-27
3465===================
3466
3467 * fixed; calling model.distinct without conditions #1541
3468 * fixed; regression in Query#count() #1542
3469 * now working on 3.6.13
3470
34713.6.12 / 2013-06-25
3472===================
3473
3474 * updated; driver to 1.3.10
3475 * updated; clearer capped collection error message #1509 [bitmage](https://github.com/bitmage)
3476 * fixed; MongooseBuffer subtype loss during casting #1517 [zedgu](https://github.com/zedgu)
3477 * fixed; docArray#id when doc.id is disabled #1492
3478 * fixed; docArray#id now supports matches on populated arrays #1492 [pgherveou](https://github.com/pgherveou)
3479 * website; fix example
3480 * website; improve _id disabling example
3481 * website; fix typo #1494 [dejj](https://github.com/dejj)
3482 * docs; added a 'Requesting new features' section #1504 [shovon](https://github.com/shovon)
3483 * docs; improve subtypes description
3484 * docs; clarify _id disabling
3485 * docs: display by alphabetical order the methods list #1508 [nicolasleger](https://github.com/nicolasleger)
3486 * tests; refactor isSelected checks
3487 * tests; remove pointless test
3488 * tests; fixed timeouts
3489
34903.6.11 / 2013-05-15
3491===================
3492
3493 * updated; driver to 1.3.5
3494 * fixed; compat w/ Object.create(null) #1484 #1485
3495 * fixed; cloning objects w/ missing constructors
3496 * fixed; prevent multiple min number validators #1481 [nrako](https://github.com/nrako)
3497 * docs; add doc.increment() example
3498 * docs; add $size example
3499 * docs; add "distinct" example
3500
35013.6.10 / 2013-05-09
3502==================
3503
3504 * update driver to 1.3.3
3505 * fixed; increment() works without other changes #1475
3506 * website; fix links to posterous
3507 * docs; fix link #1472
3508
35093.6.9 / 2013-05-02
3510==================
3511
3512 * fixed; depopulation of mixed documents #1471
3513 * fixed; use of $options in array #1462
3514 * tests; fix race condition
3515 * docs; fix default example
3516
35173.6.8 / 2013-04-25
3518==================
3519
3520 * updated; driver to 1.3.0
3521 * fixed; connection.model should retain options #1458 [vedmalex](https://github.com/vedmalex)
3522 * tests; 4-5 seconds faster
3523
35243.6.7 / 2013-04-19
3525==================
3526
3527 * fixed; population regression in 3.6.6 #1444
3528
35293.6.6 / 2013-04-18
3530==================
3531
3532 * fixed; saving populated new documents #1442
3533 * fixed; population regession in 3.6.5 #1441
3534 * website; fix copyright #1439
3535
35363.6.5 / 2013-04-15
3537==================
3538
3539 * fixed; strict:throw edge case using .set(path, val)
3540 * fixed; schema.pathType() on some numbericAlpha paths
3541 * fixed; numbericAlpha path versioning
3542 * fixed; setting nested mixed paths #1418
3543 * fixed; setting nested objects with null prop #1326
3544 * fixed; regression in v3.6 population performance #1426 [vedmalex](https://github.com/vedmalex)
3545 * fixed; read pref typos #1422 [kyano](https://github.com/kyano)
3546 * docs; fix method example
3547 * website; update faq
3548 * website; add more deep links
3549 * website; update poolSize docs
3550 * website; add 3.6 release notes
3551 * website; note about keepAlive
3552
35533.6.4 / 2013-04-03
3554==================
3555
3556 * fixed; +field conflict with $slice #1370
3557 * fixed; nested deselection conflict #1333
3558 * fixed; RangeError in ValidationError.toString() #1296
3559 * fixed; do not save user defined transforms #1415
3560 * tests; fix race condition
3561
35623.6.3 / 2013-04-02
3563==================
3564
3565 * fixed; setting subdocuments deeply nested fields #1394
3566 * fixed; regression: populated streams #1411
3567 * docs; mention hooks/validation with findAndModify
3568 * docs; mention auth
3569 * docs; add more links
3570 * examples; add document methods example
3571 * website; display "see" links for properties
3572 * website; clean up homepage
3573
35743.6.2 / 2013-03-29
3575==================
3576
3577 * fixed; corrupted sub-doc array #1408
3578 * fixed; document#update returns a Query #1397
3579 * docs; readpref strategy
3580
35813.6.1 / 2013-03-27
3582==================
3583
3584 * added; populate support to findAndModify varients #1395
3585 * added; text index type to schematypes
3586 * expose allowed index types as Schema.indexTypes
3587 * fixed; use of `setMaxListeners` as path
3588 * fixed; regression in node 0.6 on docs with > 10 arrays
3589 * fixed; do not alter schema arguments #1364
3590 * fixed; subdoc#ownerDocument() #1385
3591 * website; change search id
3592 * website; add search from google [jackdbernier](https://github.com/jackdbernier)
3593 * website; fix link
3594 * website; add 3.5.x docs release
3595 * website; fix link
3596 * docs; fix geometry
3597 * docs; hide internal constructor
3598 * docs; aggregation does not cast arguments #1399
3599 * docs; querystream options
3600 * examples; added for population
3601
36023.6.0 / 2013-03-18
3603==================
3604
3605 * changed; cast 'true'/'false' to boolean #1282 [mgrach](https://github.com/mgrach)
3606 * changed; Buffer arrays can now contain nulls
3607 * added; QueryStream transform option
3608 * added; support for authSource driver option
3609 * added; {mongoose,db}.modelNames()
3610 * added; $push w/ $slice,$sort support (MongoDB 2.4)
3611 * added; hashed index type (MongoDB 2.4)
3612 * added; support for mongodb 2.4 geojson (MongoDB 2.4)
3613 * added; value at time of validation error
3614 * added; support for object literal schemas
3615 * added; bufferCommands schema option
3616 * added; allow auth option in connections #1360 [geoah](https://github.com/geoah)
3617 * added; performance improvements to populate() [263ece9](https://github.com/LearnBoost/mongoose/commit/263ece9)
3618 * added; allow adding uncasted docs to populated arrays and properties #570
3619 * added; doc#populated(path) stores original populated _ids
3620 * added; lean population #1260
3621 * added; query.populate() now accepts an options object
3622 * added; document#populate(opts, callback)
3623 * added; Model.populate(docs, opts, callback)
3624 * added; support for rich nested path population
3625 * added; doc.array.remove(value) subdoc with _id value support #1278
3626 * added; optionally allow non-strict sets and updates
3627 * added; promises/A+ comformancy with [mpromise](https://github.com/aheckmann/mpromise)
3628 * added; promise#then
3629 * added; promise#end
3630 * fixed; use of `model` as doc property
3631 * fixed; lean population #1382
3632 * fixed; empty object mixed defaults #1380
3633 * fixed; populate w/ deselected _id using string syntax
3634 * fixed; attempted save of divergent populated arrays #1334 related
3635 * fixed; better error msg when attempting toObject as property name
3636 * fixed; non population buffer casting from doc
3637 * fixed; setting populated paths #570
3638 * fixed; casting when added docs to populated arrays #570
3639 * fixed; prohibit updating arrays selected with $elemMatch #1334
3640 * fixed; pull / set subdoc combination #1303
3641 * fixed; multiple bg index creation #1365
3642 * fixed; manual reconnection to single mongod
3643 * fixed; Constructor / version exposure #1124
3644 * fixed; CastError race condition
3645 * fixed; no longer swallowing misuse of subdoc#invalidate()
3646 * fixed; utils.clone retains RegExp opts
3647 * fixed; population of non-schema property
3648 * fixed; allow updating versionKey #1265
3649 * fixed; add EventEmitter props to reserved paths #1338
3650 * fixed; can now deselect populated doc _ids #1331
3651 * fixed; properly pass subtype to Binary in MongooseBuffer
3652 * fixed; casting _id from document with non-ObjectId _id
3653 * fixed; specifying schema type edge case { path: [{type: "String" }] }
3654 * fixed; typo in schemdate #1329 [jplock](https://github.com/jplock)
3655 * updated; driver to 1.2.14
3656 * updated; muri to 0.3.1
3657 * updated; mpromise to 0.2.1
3658 * updated; mocha 1.8.1
3659 * updated; mpath to 0.1.1
3660 * deprecated; pluralization will die in 4.x
3661 * refactor; rename private methods to something unusable as doc properties
3662 * refactor MongooseArray#remove
3663 * refactor; move expires index to SchemaDate #1328
3664 * refactor; internal document properties #1171 #1184
3665 * tests; added
3666 * docs; indexes
3667 * docs; validation
3668 * docs; populate
3669 * docs; populate
3670 * docs; add note about stream compatibility with node 0.8
3671 * docs; fix for private names
3672 * docs; Buffer -> mongodb.Binary #1363
3673 * docs; auth options
3674 * docs; improved
3675 * website; update FAQ
3676 * website; add more api links
3677 * website; add 3.5.x docs to prior releases
3678 * website; Change mongoose-types to an active repo [jackdbernier](https://github.com/jackdbernier)
3679 * website; compat with node 0.10
3680 * website; add news section
3681 * website; use T for generic type
3682 * benchmark; make adjustable
3683
36843.6.0rc1 / 2013-03-12
3685======================
3686
3687 * refactor; rename private methods to something unusable as doc properties
3688 * added; {mongoose,db}.modelNames()
3689 * added; $push w/ $slice,$sort support (MongoDB 2.4)
3690 * added; hashed index type (MongoDB 2.4)
3691 * added; support for mongodb 2.4 geojson (MongoDB 2.4)
3692 * added; value at time of validation error
3693 * added; support for object literal schemas
3694 * added; bufferCommands schema option
3695 * added; allow auth option in connections #1360 [geoah](https://github.com/geoah)
3696 * fixed; lean population #1382
3697 * fixed; empty object mixed defaults #1380
3698 * fixed; populate w/ deselected _id using string syntax
3699 * fixed; attempted save of divergent populated arrays #1334 related
3700 * fixed; better error msg when attempting toObject as property name
3701 * fixed; non population buffer casting from doc
3702 * fixed; setting populated paths #570
3703 * fixed; casting when added docs to populated arrays #570
3704 * fixed; prohibit updating arrays selected with $elemMatch #1334
3705 * fixed; pull / set subdoc combination #1303
3706 * fixed; multiple bg index creation #1365
3707 * fixed; manual reconnection to single mongod
3708 * fixed; Constructor / version exposure #1124
3709 * fixed; CastError race condition
3710 * fixed; no longer swallowing misuse of subdoc#invalidate()
3711 * fixed; utils.clone retains RegExp opts
3712 * fixed; population of non-schema property
3713 * fixed; allow updating versionKey #1265
3714 * fixed; add EventEmitter props to reserved paths #1338
3715 * fixed; can now deselect populated doc _ids #1331
3716 * updated; muri to 0.3.1
3717 * updated; driver to 1.2.12
3718 * updated; mpromise to 0.2.1
3719 * deprecated; pluralization will die in 4.x
3720 * docs; Buffer -> mongodb.Binary #1363
3721 * docs; auth options
3722 * docs; improved
3723 * website; add news section
3724 * benchmark; make adjustable
3725
37263.6.0rc0 / 2013-02-03
3727======================
3728
3729 * changed; cast 'true'/'false' to boolean #1282 [mgrach](https://github.com/mgrach)
3730 * changed; Buffer arrays can now contain nulls
3731 * fixed; properly pass subtype to Binary in MongooseBuffer
3732 * fixed; casting _id from document with non-ObjectId _id
3733 * fixed; specifying schema type edge case { path: [{type: "String" }] }
3734 * fixed; typo in schemdate #1329 [jplock](https://github.com/jplock)
3735 * refactor; move expires index to SchemaDate #1328
3736 * refactor; internal document properties #1171 #1184
3737 * added; performance improvements to populate() [263ece9](https://github.com/LearnBoost/mongoose/commit/263ece9)
3738 * added; allow adding uncasted docs to populated arrays and properties #570
3739 * added; doc#populated(path) stores original populated _ids
3740 * added; lean population #1260
3741 * added; query.populate() now accepts an options object
3742 * added; document#populate(opts, callback)
3743 * added; Model.populate(docs, opts, callback)
3744 * added; support for rich nested path population
3745 * added; doc.array.remove(value) subdoc with _id value support #1278
3746 * added; optionally allow non-strict sets and updates
3747 * added; promises/A+ comformancy with [mpromise](https://github.com/aheckmann/mpromise)
3748 * added; promise#then
3749 * added; promise#end
3750 * updated; mocha 1.8.1
3751 * updated; muri to 0.3.0
3752 * updated; mpath to 0.1.1
3753 * updated; docs
3754
37553.5.16 / 2013-08-13
3756===================
3757
3758 * updated; driver to 1.3.18
3759
37603.5.15 / 2013-07-26
3761==================
3762
3763 * updated; sliced to 0.0.5
3764 * updated; driver to 1.3.12
3765 * fixed; regression in Query#count() due to driver change
3766 * tests; fixed timeouts
3767 * tests; handle differing test uris
3768
37693.5.14 / 2013-05-15
3770===================
3771
3772 * updated; driver to 1.3.5
3773 * fixed; compat w/ Object.create(null) #1484 #1485
3774 * fixed; cloning objects missing constructors
3775 * fixed; prevent multiple min number validators #1481 [nrako](https://github.com/nrako)
3776
37773.5.13 / 2013-05-09
3778==================
3779
3780 * update driver to 1.3.3
3781 * fixed; use of $options in array #1462
3782
37833.5.12 / 2013-04-25
3784===================
3785
3786 * updated; driver to 1.3.0
3787 * fixed; connection.model should retain options #1458 [vedmalex](https://github.com/vedmalex)
3788 * fixed; read pref typos #1422 [kyano](https://github.com/kyano)
3789
37903.5.11 / 2013-04-03
3791==================
3792
3793 * fixed; +field conflict with $slice #1370
3794 * fixed; RangeError in ValidationError.toString() #1296
3795 * fixed; nested deselection conflict #1333
3796 * remove time from Makefile
3797
37983.5.10 / 2013-04-02
3799==================
3800
3801 * fixed; setting subdocuments deeply nested fields #1394
3802 * fixed; do not alter schema arguments #1364
3803
38043.5.9 / 2013-03-15
3805==================
3806
3807 * updated; driver to 1.2.14
3808 * added; support for authSource driver option (mongodb 2.4)
3809 * added; QueryStream transform option (node 0.10 helper)
3810 * fixed; backport for saving required populated buffers
3811 * fixed; pull / set subdoc combination #1303
3812 * fixed; multiple bg index creation #1365
3813 * test; added for saveable required populated buffers
3814 * test; added for #1365
3815 * test; add authSource test
3816
38173.5.8 / 2013-03-12
3818==================
3819
3820 * added; auth option in connection [geoah](https://github.com/geoah)
3821 * fixed; CastError race condition
3822 * docs; add note about stream compatibility with node 0.8
3823
38243.5.7 / 2013-02-22
3825==================
3826
3827 * updated; driver to 1.2.13
3828 * updated; muri to 0.3.1 #1347
3829 * fixed; utils.clone retains RegExp opts #1355
3830 * fixed; deepEquals RegExp support
3831 * tests; fix a connection test
3832 * website; clean up docs [afshinm](https://github.com/afshinm)
3833 * website; update homepage
3834 * website; migragtion: emphasize impact of strict docs #1264
3835
38363.5.6 / 2013-02-14
3837==================
3838
3839 * updated; driver to 1.2.12
3840 * fixed; properly pass Binary subtype
3841 * fixed; add EventEmitter props to reserved paths #1338
3842 * fixed; use correct node engine version
3843 * fixed; display empty docs as {} in log output #953 follow up
3844 * improved; "bad $within $box argument" error message
3845 * populate; add unscientific benchmark
3846 * website; add stack overflow to help section
3847 * website; use better code font #1336 [risseraka](https://github.com/risseraka)
3848 * website; clarify where help is available
3849 * website; fix source code links #1272 [floatingLomas](https://github.com/floatingLomas)
3850 * docs; be specific about _id schema option #1103
3851 * docs; add ensureIndex error handling example
3852 * docs; README
3853 * docs; CONTRIBUTING.md
3854
38553.5.5 / 2013-01-29
3856==================
3857
3858 * updated; driver to 1.2.11
3859 * removed; old node < 0.6x shims
3860 * fixed; documents with Buffer _ids equality
3861 * fixed; MongooseBuffer properly casts numbers
3862 * fixed; reopening closed connection on alt host/port #1287
3863 * docs; fixed typo in Readme #1298 [rened](https://github.com/rened)
3864 * docs; fixed typo in migration docs [Prinzhorn](https://github.com/Prinzhorn)
3865 * docs; fixed incorrect annotation in SchemaNumber#min [bilalq](https://github.com/bilalq)
3866 * docs; updated
3867
38683.5.4 / 2013-01-07
3869==================
3870
3871 * changed; "_pres" & "_posts" are now reserved pathnames #1261
3872 * updated; driver to 1.2.8
3873 * fixed; exception when reopening a replica set. #1263 [ethankan](https://github.com/ethankan)
3874 * website; updated
3875
38763.5.3 / 2012-12-26
3877==================
3878
3879 * added; support for geo object notation #1257
3880 * fixed; $within query casting with arrays
3881 * fixed; unix domain socket support #1254
3882 * updated; driver to 1.2.7
3883 * updated; muri to 0.0.5
3884
38853.5.2 / 2012-12-17
3886==================
3887
3888 * fixed; using auth with replica sets #1253
3889
38903.5.1 / 2012-12-12
3891==================
3892
3893 * fixed; regression when using subdoc with `path` as pathname #1245 [daeq](https://github.com/daeq)
3894 * fixed; safer db option checks
3895 * updated; driver to 1.2.5
3896 * website; add more examples
3897 * website; clean up old docs
3898 * website; fix prev release urls
3899 * docs; clarify streaming with HTTP responses
3900
39013.5.0 / 2012-12-10
3902==================
3903
3904 * added; paths to CastErrors #1239
3905 * added; support for mongodb connection string spec #1187
3906 * added; post validate event
3907 * added; Schema#get (to retrieve schema options)
3908 * added; VersionError #1071
3909 * added; npmignore [hidekiy](https://github.com/hidekiy)
3910 * update; driver to 1.2.3
3911 * fixed; stackoverflow in setter #1234
3912 * fixed; utils.isObject()
3913 * fixed; do not clobber user specified driver writeConcern #1227
3914 * fixed; always pass current document to post hooks
3915 * fixed; throw error when user attempts to overwrite a model
3916 * fixed; connection.model only caches on connection #1209
3917 * fixed; respect conn.model() creation when matching global model exists #1209
3918 * fixed; passing model name + collection name now always honors collection name
3919 * fixed; setting virtual field to an empty object #1154
3920 * fixed; subclassed MongooseErrors exposure, now available in mongoose.Error.xxxx
3921 * fixed; model.remove() ignoring callback when executed twice [daeq](https://github.com/daeq) #1210
3922 * docs; add collection option to schema api docs #1222
3923 * docs; NOTE about db safe options
3924 * docs; add post hooks docs
3925 * docs; connection string options
3926 * docs; middleware is not executed with Model.remove #1241
3927 * docs; {g,s}etter introspection #777
3928 * docs; update validation docs
3929 * docs; add link to plugins page
3930 * docs; clarify error returned by unique indexes #1225
3931 * docs; more detail about disabling autoIndex behavior
3932 * docs; add homepage section to package (npm docs mongoose)
3933 * docs; more detail around collection name pluralization #1193
3934 * website; add .important css
3935 * website; update models page
3936 * website; update getting started
3937 * website; update quick start
3938
39393.4.0 / 2012-11-10
3940==================
3941
3942 * added; support for generic toJSON/toObject transforms #1160 #1020 #1197
3943 * added; doc.set() merge support #1148 [NuORDER](https://github.com/NuORDER)
3944 * added; query#add support #1188 [aleclofabbro](https://github.com/aleclofabbro)
3945 * changed; adding invalid nested paths to non-objects throws 4216f14
3946 * changed; fixed; stop invalid function cloning (internal fix)
3947 * fixed; add query $and casting support #1180 [anotheri](https://github.com/anotheri)
3948 * fixed; overwriting of query arguments #1176
3949 * docs; fix expires examples
3950 * docs; transforms
3951 * docs; schema `collection` option docs [hermanjunge](https://github.com/hermanjunge)
3952 * website; updated
3953 * tests; added
3954
39553.3.1 / 2012-10-11
3956==================
3957
3958 * fixed; allow goose.connect(uris, dbname, opts) #1144
3959 * docs; persist API private checked state across page loads
3960
39613.3.0 / 2012-10-10
3962==================
3963
3964 * fixed; passing options as 2nd arg to connect() #1144
3965 * fixed; race condition after no-op save #1139
3966 * fixed; schema field selection application in findAndModify #1150
3967 * fixed; directly setting arrays #1126
3968 * updated; driver to 1.1.11
3969 * updated; collection pluralization rules [mrickard](https://github.com/mrickard)
3970 * tests; added
3971 * docs; updated
3972
39733.2.2 / 2012-10-08
3974==================
3975
3976 * updated; driver to 1.1.10 #1143
3977 * updated; use sliced 0.0.3
3978 * fixed; do not recast embedded docs unnecessarily
3979 * fixed; expires schema option helper #1132
3980 * fixed; built in string setters #1131
3981 * fixed; debug output for Dates/ObjectId properties #1129
3982 * docs; fixed Javascript syntax error in example [olalonde](https://github.com/olalonde)
3983 * docs; fix toJSON example #1137
3984 * docs; add ensureIndex production notes
3985 * docs; fix spelling
3986 * docs; add blogposts about v3
3987 * website; updated
3988 * removed; undocumented inGroupsOf util
3989 * tests; added
3990
39913.2.1 / 2012-09-28
3992==================
3993
3994 * fixed; remove query batchSize option default of 1000 https://github.com/learnboost/mongoose/commit/3edaa8651
3995 * docs; updated
3996 * website; updated
3997
39983.2.0 / 2012-09-27
3999==================
4000
4001 * added; direct array index assignment with casting support `doc.array.set(index, value)`
4002 * fixed; QueryStream#resume within same tick as pause() #1116
4003 * fixed; default value validatation #1109
4004 * fixed; array splice() not casting #1123
4005 * fixed; default array construction edge case #1108
4006 * fixed; query casting for inequalities in arrays #1101 [dpatti](https://github.com/dpatti)
4007 * tests; added
4008 * website; more documentation
4009 * website; fixed layout issue #1111 [SlashmanX](https://github.com/SlashmanX)
4010 * website; refactored [guille](https://github.com/guille)
4011
40123.1.2 / 2012-09-10
4013==================
4014
4015 * added; ReadPreferrence schema option #1097
4016 * updated; driver to 1.1.7
4017 * updated; default query batchSize to 1000
4018 * fixed; we now cast the mapReduce query option #1095
4019 * fixed; $elemMatch+$in with field selection #1091
4020 * fixed; properly cast $elemMatch+$in conditions #1100
4021 * fixed; default field application of subdocs #1027
4022 * fixed; querystream prematurely dying #1092
4023 * fixed; querystream never resumes when paused at getMore boundries #1092
4024 * fixed; querystream occasionally emits data events after destroy #1092
4025 * fixed; remove unnecessary ObjectId creation in querystream
4026 * fixed; allow ne(boolean) again #1093
4027 * docs; add populate/field selection syntax notes
4028 * docs; add toObject/toJSON options detail
4029 * docs; `read` schema option
4030
40313.1.1 / 2012-08-31
4032==================
4033
4034 * updated; driver to 1.1.6
4035
40363.1.0 / 2012-08-29
4037==================
4038
4039 * changed; fixed; directly setting nested objects now overwrites entire object (previously incorrectly merged them)
4040 * added; read pref support (mongodb 2.2) 205a709c
4041 * added; aggregate support (mongodb 2.2) f3a5bd3d
4042 * added; virtual {g,s}etter introspection (#1070)
4043 * updated; docs [brettz9](https://github.com/brettz9)
4044 * updated; driver to 1.1.5
4045 * fixed; retain virtual setter return values (#1069)
4046
40473.0.3 / 2012-08-23
4048==================
4049
4050 * fixed; use of nested paths beginning w/ numbers #1062
4051 * fixed; query population edge case #1053 #1055 [jfremy](https://github.com/jfremy)
4052 * fixed; simultaneous top and sub level array modifications #1073
4053 * added; id and _id schema option aliases + tests
4054 * improve debug formatting to allow copy/paste logged queries into mongo shell [eknkc](https://github.com/eknkc)
4055 * docs
4056
40573.0.2 / 2012-08-17
4058==================
4059
4060 * added; missing support for v3 sort/select syntax to findAndModify helpers (#1058)
4061 * fixed; replset fullsetup event emission
4062 * fixed; reconnected event for replsets
4063 * fixed; server reconnection setting discovery
4064 * fixed; compat with non-schema path props using positional notation (#1048)
4065 * fixed; setter/casting order (#665)
4066 * docs; updated
4067
40683.0.1 / 2012-08-11
4069==================
4070
4071 * fixed; throw Error on bad validators (1044)
4072 * fixed; typo in EmbeddedDocument#parentArray [lackac]
4073 * fixed; repair mongoose.SchemaTypes alias
4074 * updated; docs
4075
40763.0.0 / 2012-08-07
4077==================
4078
4079 * removed; old subdocument#commit method
4080 * fixed; setting arrays of matching docs [6924cbc2]
4081 * fixed; doc!remove event now emits in save order as save for consistency
4082 * fixed; pre-save hooks no longer fire on subdocuments when validation fails
4083 * added; subdoc#parent() and subdoc#parentArray() to access subdocument parent objects
4084 * added; query#lean() helper
4085
40863.0.0rc0 / 2012-08-01
4087=====================
4088
4089 * fixed; allow subdoc literal declarations containing "type" pathname (#993)
4090 * fixed; unsetting a default array (#758)
4091 * fixed; boolean $in queries (#998)
4092 * fixed; allow use of `options` as a pathname (#529)
4093 * fixed; `model` is again a permitted schema path name
4094 * fixed; field selection option on subdocs (#1022)
4095 * fixed; handle another edge case with subdoc saving (#975)
4096 * added; emit save err on model if listening
4097 * added; MongoDB TTL collection support (#1006)
4098 * added; $center options support
4099 * added; $nearSphere and $polygon support
4100 * updated; driver version to 1.1.2
4101
41023.0.0alpha2 / 2012-07-18
4103=========================
4104
4105 * changed; index errors are now emitted on their model and passed to an optional callback (#984)
4106 * fixed; specifying index along with sparse/unique option no longer overwrites (#1004)
4107 * fixed; never swallow connection errors (#618)
4108 * fixed; creating object from model with emded object no longer overwrites defaults [achurkin] (#859)
4109 * fixed; stop needless validation of unchanged/unselected fields (#891)
4110 * fixed; document#equals behavior of objectids (#974)
4111 * fixed; honor the minimize schema option (#978)
4112 * fixed; provide helpful error msgs when reserved schema path is used (#928)
4113 * fixed; callback to conn#disconnect is optional (#875)
4114 * fixed; handle missing protocols in connection urls (#987)
4115 * fixed; validate args to query#where (#969)
4116 * fixed; saving modified/removed subdocs (#975)
4117 * fixed; update with $pull from Mixed array (#735)
4118 * fixed; error with null shard key value
4119 * fixed; allow unsetting enums (#967)
4120 * added; support for manual index creation (#984)
4121 * added; support for disabled auto-indexing (#984)
4122 * added; support for preserving MongooseArray#sort changes (#752)
4123 * added; emit state change events on connection
4124 * added; support for specifying BSON subtype in MongooseBuffer#toObject [jcrugzz]
4125 * added; support for disabled versioning (#977)
4126 * added; implicit "new" support for models and Schemas
4127
41283.0.0alpha1 / 2012-06-15
4129=========================
4130
4131 * removed; doc#commit (use doc#markModified)
4132 * removed; doc.modified getter (#950)
4133 * removed; mongoose{connectSet,createSetConnection}. use connect,createConnection instead
4134 * removed; query alias methods 1149804c
4135 * removed; MongooseNumber
4136 * changed; now creating indexes in background by default
4137 * changed; strict mode now enabled by default (#952)
4138 * changed; doc#modifiedPaths is now a method (#950)
4139 * changed; getters no longer cast (#820); casting happens during set
4140 * fixed; no need to pass updateArg to findOneAndUpdate (#931)
4141 * fixed: utils.merge bug when merging nested non-objects. [treygriffith]
4142 * fixed; strict:throw should produce errors in findAndModify (#963)
4143 * fixed; findAndUpdate no longer overwrites document (#962)
4144 * fixed; setting default DocumentArrays (#953)
4145 * fixed; selection of _id with schema deselection (#954)
4146 * fixed; ensure promise#error emits instanceof Error
4147 * fixed; CursorStream: No stack overflow on any size result (#929)
4148 * fixed; doc#remove now passes safe options
4149 * fixed; invalid use of $set during $pop
4150 * fixed; array#{$pop,$shift} mirror MongoDB behavior
4151 * fixed; no longer test non-required vals in string match (#934)
4152 * fixed; edge case with doc#inspect
4153 * fixed; setter order (#665)
4154 * fixed; setting invalid paths in strict mode (#916)
4155 * fixed; handle docs without id in DocumentArray#id method (#897)
4156 * fixed; do not save virtuals during model.update (#894)
4157 * fixed; sub doc toObject virtuals application (#889)
4158 * fixed; MongooseArray#pull of ObjectId (#881)
4159 * fixed; handle passing db name with any repl set string
4160 * fixed; default application of selected fields (#870)
4161 * fixed; subdoc paths reported in validation errors (#725)
4162 * fixed; incorrect reported num of affected docs in update ops (#862)
4163 * fixed; connection assignment in Model#model (#853)
4164 * fixed; stringifying arrays of docs (#852)
4165 * fixed; modifying subdoc and parent array works (#842)
4166 * fixed; passing undefined to next hook (#785)
4167 * fixed; Query#{update,remove}() works without callbacks (#788)
4168 * fixed; set/updating nested objects by parent pathname (#843)
4169 * fixed; allow null in number arrays (#840)
4170 * fixed; isNew on sub doc after insertion error (#837)
4171 * fixed; if an insert fails, set isNew back to false [boutell]
4172 * fixed; isSelected when only _id is selected (#730)
4173 * fixed; setting an unset default value (#742)
4174 * fixed; query#sort error messaging (#671)
4175 * fixed; support for passing $options with $regex
4176 * added; array of object literal notation in schema creates DocumentArrays
4177 * added; gt,gte,lt,lte query support for arrays (#902)
4178 * added; capped collection support (#938)
4179 * added; document versioning support
4180 * added; inclusion of deselected schema path (#786)
4181 * added; non-atomic array#pop
4182 * added; EmbeddedDocument constructor is now exposed in DocArray#create 7cf8beec
4183 * added; mapReduce support (#678)
4184 * added; support for a configurable minimize option #to{Object,JSON}(option) (#848)
4185 * added; support for strict: `throws` [regality]
4186 * added; support for named schema types (#795)
4187 * added; to{Object,JSON} schema options (#805)
4188 * added; findByIdAnd{Update,Remove}()
4189 * added; findOneAnd{Update,Remove}()
4190 * added; query.setOptions()
4191 * added; instance.update() (#794)
4192 * added; support specifying model in populate() [DanielBaulig]
4193 * added; `lean` query option [gitfy]
4194 * added; multi-atomic support to MongooseArray#nonAtomicPush
4195 * added; support for $set + other $atomic ops on single array
4196 * added; tests
4197 * updated; driver to 1.0.2
4198 * updated; query.sort() syntax to mirror query.select()
4199 * updated; clearer cast error msg for array numbers
4200 * updated; docs
4201 * updated; doc.clone 3x faster (#950)
4202 * updated; only create _id if necessary (#950)
4203
42042.7.3 / 2012-08-01
4205==================
4206
4207 * fixed; boolean $in queries (#998)
4208 * fixed field selection option on subdocs (#1022)
4209
42102.7.2 / 2012-07-18
4211==================
4212
4213 * fixed; callback to conn#disconnect is optional (#875)
4214 * fixed; handle missing protocols in connection urls (#987)
4215 * fixed; saving modified/removed subdocs (#975)
4216 * updated; tests
4217
42182.7.1 / 2012-06-26
4219===================
4220
4221 * fixed; sharding: when a document holds a null as a value of the shard key
4222 * fixed; update() using $pull on an array of Mixed (gh-735)
4223 * deprecated; MongooseNumber#{inc, increment, decrement} methods
4224 * tests; now using mocha
4225
42262.7.0 / 2012-06-14
4227===================
4228
4229 * added; deprecation warnings to methods being removed in 3.x
4230
42312.6.8 / 2012-06-14
4232===================
4233
4234 * fixed; edge case when using 'options' as a path name (#961)
4235
42362.6.7 / 2012-06-08
4237===================
4238
4239 * fixed; ensure promise#error always emits instanceof Error
4240 * fixed; selection of _id w/ another excluded path (#954)
4241 * fixed; setting default DocumentArrays (#953)
4242
42432.6.6 / 2012-06-06
4244===================
4245
4246 * fixed; stack overflow in query stream with large result sets (#929)
4247 * added; $gt, $gte, $lt, $lte support to arrays (#902)
4248 * fixed; pass option `safe` along to doc#remove() calls
4249
42502.6.5 / 2012-05-24
4251===================
4252
4253 * fixed; do not save virtuals in Model.update (#894)
4254 * added; missing $ prefixed query aliases (going away in 3.x) (#884) [timoxley]
4255 * fixed; setting invalid paths in strict mode (#916)
4256 * fixed; resetting isNew after insert failure (#837) [boutell]
4257
42582.6.4 / 2012-05-15
4259===================
4260
4261 * updated; backport string regex $options to 2.x
4262 * updated; use driver 1.0.2 (performance improvements) (#914)
4263 * fixed; calling MongooseDocumentArray#id when the doc has no _id (#897)
4264
42652.6.3 / 2012-05-03
4266===================
4267
4268 * fixed; repl-set connectivity issues during failover on MongoDB 2.0.1
4269 * updated; driver to 1.0.0
4270 * fixed; virtuals application of subdocs when using toObject({ virtuals: true }) (#889)
4271 * fixed; MongooseArray#pull of ObjectId correctly updates the array itself (#881)
4272
42732.6.2 / 2012-04-30
4274===================
4275
4276 * fixed; default field application of selected fields (#870)
4277
42782.6.1 / 2012-04-30
4279===================
4280
4281 * fixed; connection assignment in mongoose#model (#853, #877)
4282 * fixed; incorrect reported num of affected docs in update ops (#862)
4283
42842.6.0 / 2012-04-19
4285===================
4286
4287 * updated; hooks.js to 0.2.1
4288 * fixed; issue with passing undefined to a hook callback. thanks to [chrisleishman] for reporting.
4289 * fixed; updating/setting nested objects in strict schemas (#843) as reported by [kof]
4290 * fixed; Query#{update,remove}() work without callbacks again (#788)
4291 * fixed; modifying subdoc along with parent array $atomic op (#842)
4292
42932.5.14 / 2012-04-13
4294===================
4295
4296 * fixed; setting an unset default value (#742)
4297 * fixed; doc.isSelected(otherpath) when only _id is selected (#730)
4298 * updated; docs
4299
43002.5.13 / 2012-03-22
4301===================
4302
4303 * fixed; failing validation of unselected required paths (#730,#713)
4304 * fixed; emitting connection error when only one listener (#759)
4305 * fixed; MongooseArray#splice was not returning values (#784) [chrisleishman]
4306
43072.5.12 / 2012-03-21
4308===================
4309
4310 * fixed; honor the `safe` option in all ensureIndex calls
4311 * updated; node-mongodb-native driver to 0.9.9-7
4312
43132.5.11 / 2012-03-15
4314===================
4315
4316 * added; introspection for getters/setters (#745)
4317 * updated; node-mongodb-driver to 0.9.9-5
4318 * added; tailable method to Query (#769) [holic]
4319 * fixed; Number min/max validation of null (#764) [btamas]
4320 * added; more flexible user/password connection options (#738) [KarneAsada]
4321
43222.5.10 / 2012-03-06
4323===================
4324
4325 * updated; node-mongodb-native driver to 0.9.9-4
4326 * added; Query#comment()
4327 * fixed; allow unsetting arrays
4328 * fixed; hooking the set method of subdocuments (#746)
4329 * fixed; edge case in hooks
4330 * fixed; allow $id and $ref in queries (fixes compatibility with mongoose-dbref) (#749) [richtera]
4331 * added; default path selection to SchemaTypes
4332
43332.5.9 / 2012-02-22
4334===================
4335
4336 * fixed; properly cast nested atomic update operators for sub-documents
4337
43382.5.8 / 2012-02-21
4339===================
4340
4341 * added; post 'remove' middleware includes model that was removed (#729) [timoxley]
4342
43432.5.7 / 2012-02-09
4344===================
4345
4346 * fixed; RegExp validators on node >= v0.6.x
4347
43482.5.6 / 2012-02-09
4349===================
4350
4351 * fixed; emit errors returned from db.collection() on the connection (were being swallowed)
4352 * added; can add multiple validators in your schema at once (#718) [diogogmt]
4353 * fixed; strict embedded documents (#717)
4354 * updated; docs [niemyjski]
4355 * added; pass number of affected docs back in model.update/save
4356
43572.5.5 / 2012-02-03
4358===================
4359
4360 * fixed; RangeError: maximum call stack exceed error when removing docs with Number _id (#714)
4361
43622.5.4 / 2012-02-03
4363===================
4364
4365 * fixed; RangeError: maximum call stack exceed error (#714)
4366
43672.5.3 / 2012-02-02
4368===================
4369
4370 * added; doc#isSelected(path)
4371 * added; query#equals()
4372 * added; beta sharding support
4373 * added; more descript error msgs (#700) [obeleh]
4374 * added; document.modifiedPaths (#709) [ljharb]
4375 * fixed; only functions can be added as getters/setters (#707,704) [ljharb]
4376
43772.5.2 / 2012-01-30
4378===================
4379
4380 * fixed; rollback -native driver to 0.9.7-3-5 (was causing timeouts and other replica set weirdness)
4381 * deprecated; MongooseNumber (will be moved to a separate repo for 3.x)
4382 * added; init event is emitted on schemas
4383
43842.5.1 / 2012-01-27
4385===================
4386
4387 * fixed; honor strict schemas in Model.update (#699)
4388
43892.5.0 / 2012-01-26
4390===================
4391
4392 * added; doc.toJSON calls toJSON on embedded docs when exists [jerem]
4393 * added; populate support for refs of type Buffer (#686) [jerem]
4394 * added; $all support for ObjectIds and Dates (#690)
4395 * fixed; virtual setter calling on instantiation when strict: true (#682) [hunterloftis]
4396 * fixed; doc construction triggering getters (#685)
4397 * fixed; MongooseBuffer check in deepEquals (#688)
4398 * fixed; range error when using Number _ids with `instance.save()` (#691)
4399 * fixed; isNew on embedded docs edge case (#680)
4400 * updated; driver to 0.9.8-3
4401 * updated; expose `model()` method within static methods
4402
44032.4.10 / 2012-01-10
4404===================
4405
4406 * added; optional getter application in .toObject()/.toJSON() (#412)
4407 * fixed; nested $operators in $all queries (#670)
4408 * added; $nor support (#674)
4409 * fixed; bug when adding nested schema (#662) [paulwe]
4410
44112.4.9 / 2012-01-04
4412===================
4413
4414 * updated; driver to 0.9.7-3-5 to fix Linux performance degradation on some boxes
4415
44162.4.8 / 2011-12-22
4417===================
4418
4419 * updated; bump -native to 0.9.7.2-5
4420 * fixed; compatibility with date.js (#646) [chrisleishman]
4421 * changed; undocumented schema "lax" option to "strict"
4422 * fixed; default value population for strict schemas
4423 * updated; the nextTick helper for small performance gain. 1bee2a2
4424
44252.4.7 / 2011-12-16
4426===================
4427
4428 * fixed; bug in 2.4.6 with path setting
4429 * updated; bump -native to 0.9.7.2-1
4430 * added; strict schema option [nw]
4431
44322.4.6 / 2011-12-16
4433===================
4434
4435 * fixed; conflicting mods on update bug [sirlantis]
4436 * improved; doc.id getter performance
4437
44382.4.5 / 2011-12-14
4439===================
4440
4441 * fixed; bad MongooseArray behavior in 2.4.2 - 2.4.4
4442
44432.4.4 / 2011-12-14
4444===================
4445
4446 * fixed; MongooseArray#doAtomics throwing after sliced
4447
44482.4.3 / 2011-12-14
4449===================
4450
4451 * updated; system.profile schema for MongoDB 2x
4452
44532.4.2 / 2011-12-12
4454===================
4455
4456 * fixed; partially populating multiple children of subdocs (#639) [kenpratt]
4457 * fixed; allow Update of numbers to null (#640) [jerem]
4458
44592.4.1 / 2011-12-02
4460===================
4461
4462 * added; options support for populate() queries
4463 * updated; -native driver to 0.9.7-1.4
4464
44652.4.0 / 2011-11-29
4466===================
4467
4468 * added; QueryStreams (#614)
4469 * added; debug print mode for development
4470 * added; $within support to Array queries (#586) [ggoodale]
4471 * added; $centerSphere query support
4472 * fixed; $within support
4473 * added; $unset is now used when setting a path to undefined (#519)
4474 * added; query#batchSize support
4475 * updated; docs
4476 * updated; -native driver to 0.9.7-1.3 (provides Windows support)
4477
44782.3.13 / 2011-11-15
4479===================
4480
4481 * fixed; required validation for Refs (#612) [ded]
4482 * added; $nearSphere support for Arrays (#610)
4483
44842.3.12 / 2011-11-09
4485===================
4486
4487 * fixed; regression, objects passed to Model.update should not be changed (#605)
4488 * fixed; regression, empty Model.update should not be executed
4489
44902.3.11 / 2011-11-08
4491===================
4492
4493 * fixed; using $elemMatch on arrays of Mixed types (#591)
4494 * fixed; allow using $regex when querying Arrays (#599)
4495 * fixed; calling Model.update with no atomic keys (#602)
4496
44972.3.10 / 2011-11-05
4498===================
4499
4500 * fixed; model.update casting for nested paths works (#542)
4501
45022.3.9 / 2011-11-04
4503==================
4504
4505 * fixed; deepEquals check for MongooseArray returned false
4506 * fixed; reset modified flags of embedded docs after save [gitfy]
4507 * fixed; setting embedded doc with identical values no longer marks modified [gitfy]
4508 * updated; -native driver to 0.9.6.23 [mlazarov]
4509 * fixed; Model.update casting (#542, #545, #479)
4510 * fixed; populated refs no longer fail required validators (#577)
4511 * fixed; populating refs of objects with custom ids works
4512 * fixed; $pop & $unset work with Model.update (#574)
4513 * added; more helpful debugging message for Schema#add (#578)
4514 * fixed; accessing .id when no _id exists now returns null (#590)
4515
45162.3.8 / 2011-10-26
4517==================
4518
4519 * added; callback to query#findOne is now optional (#581)
4520
45212.3.7 / 2011-10-24
4522==================
4523
4524 * fixed; wrapped save/remove callbacks in nextTick to mitigate -native swallowing thrown errors
4525
45262.3.6 / 2011-10-21
4527==================
4528
4529 * fixed; exclusion of embedded doc _id from query results (#541)
4530
45312.3.5 / 2011-10-19
4532==================
4533
4534 * fixed; calling queries without passing a callback works (#569)
4535 * fixed; populate() works with String and Number _ids too (#568)
4536
45372.3.4 / 2011-10-18
4538==================
4539
4540 * added; Model.create now accepts an array as a first arg
4541 * fixed; calling toObject on a DocumentArray with nulls no longer throws
4542 * fixed; calling inspect on a DocumentArray with nulls no longer throws
4543 * added; MongooseArray#unshift support
4544 * fixed; save hooks now fire on embedded documents [gitfy] (#456)
4545 * updated; -native driver to 0.9.6-22
4546 * fixed; correctly pass $addToSet op instead of $push
4547 * fixed; $addToSet properly detects dates
4548 * fixed; $addToSet with multiple items works
4549 * updated; better node 0.6 Buffer support
4550
45512.3.3 / 2011-10-12
4552==================
4553
4554 * fixed; population conditions in multi-query settings [vedmalex] (#563)
4555 * fixed; now compatible with Node v0.5.x
4556
45572.3.2 / 2011-10-11
4558==================
4559
4560 * fixed; population of null subdoc properties no longer hangs (#561)
4561
45622.3.1 / 2011-10-10
4563==================
4564
4565 * added; support for Query filters to populate() [eneko]
4566 * fixed; querying with number no longer crashes mongodb (#555) [jlbyrey]
4567 * updated; version of -native driver to 0.9.6-21
4568 * fixed; prevent query callbacks that throw errors from corrupting -native connection state
4569
45702.3.0 / 2011-10-04
4571==================
4572
4573 * fixed; nulls as default values for Boolean now works as expected
4574 * updated; version of -native driver to 0.9.6-20
4575
45762.2.4 / 2011-10-03
4577==================
4578
4579 * fixed; populate() works when returned array contains undefined/nulls
4580
45812.2.3 / 2011-09-29
4582==================
4583
4584 * updated; version of -native driver to 0.9.6-19
4585
45862.2.2 / 2011-09-28
4587==================
4588
4589 * added; $regex support to String [davidandrewcope]
4590 * added; support for other contexts like repl etc (#535)
4591 * fixed; clear modified state properly after saving
4592 * added; $addToSet support to Array
4593
45942.2.1 / 2011-09-22
4595==================
4596
4597 * more descript error when casting undefined to string
4598 * updated; version of -native driver to 0.9.6-18
4599
46002.2.0 / 2011-09-22
4601==================
4602
4603 * fixed; maxListeners warning on schemas with many arrays (#530)
4604 * changed; return / apply defaults based on fields selected in query (#423)
4605 * fixed; correctly detect Mixed types within schema arrays (#532)
4606
46072.1.4 / 2011-09-20
4608==================
4609
4610 * fixed; new private methods that stomped on users code
4611 * changed; finished removing old "compat" support which did nothing
4612
46132.1.3 / 2011-09-16
4614==================
4615
4616 * updated; version of -native driver to 0.9.6-15
4617 * added; emit `error` on connection when open fails [edwardhotchkiss]
4618 * added; index support to Buffers (thanks justmoon for helping track this down)
4619 * fixed; passing collection name via schema in conn.model() now works (thanks vedmalex for reporting)
4620
46212.1.2 / 2011-09-07
4622==================
4623
4624 * fixed; Query#find with no args no longer throws
4625
46262.1.1 / 2011-09-07
4627==================
4628
4629 * added; support Model.count(fn)
4630 * fixed; compatibility with node >=0.4.0 < 0.4.3
4631 * added; pass model.options.safe through with .save() so w:2, wtimeout:5000 options work [andrewjstone]
4632 * added; support for $type queries
4633 * added; support for Query#or
4634 * added; more tests
4635 * optimized populate queries
4636
46372.1.0 / 2011-09-01
4638==================
4639
4640 * changed; document#validate is a public method
4641 * fixed; setting number to same value no longer marks modified (#476) [gitfy]
4642 * fixed; Buffers shouldn't have default vals
4643 * added; allow specifying collection name in schema (#470) [ixti]
4644 * fixed; reset modified paths and atomics after saved (#459)
4645 * fixed; set isNew on embedded docs to false after save
4646 * fixed; use self to ensure proper scope of options in doOpenSet (#483) [andrewjstone]
4647
46482.0.4 / 2011-08-29
4649==================
4650
4651 * Fixed; Only send the depopulated ObjectId instead of the entire doc on save (DBRefs)
4652 * Fixed; Properly cast nested array values in Model.update (the data was stored in Mongo incorrectly but recast on document fetch was "fixing" it)
4653
46542.0.3 / 2011-08-28
4655==================
4656
4657 * Fixed; manipulating a populated array no longer causes infinite loop in BSON serializer during save (#477)
4658 * Fixed; populating an empty array no longer hangs foreeeeeeeever (#481)
4659
46602.0.2 / 2011-08-25
4661==================
4662
4663 * Fixed; Maintain query option key order (fixes 'bad hint' error from compound query hints)
4664
46652.0.1 / 2011-08-25
4666==================
4667
4668 * Fixed; do not over-write the doc when no valide props exist in Model.update (#473)
4669
46702.0.0 / 2011-08-24
4671===================
4672
4673 * Added; support for Buffers [justmoon]
4674 * Changed; improved error handling [maelstrom]
4675 * Removed: unused utils.erase
4676 * Fixed; support for passing other context object into Schemas (#234) [Sija]
4677 * Fixed; getters are no longer circular refs to themselves (#366)
4678 * Removed; unused compat.js
4679 * Fixed; getter/setter scopes are set properly
4680 * Changed; made several private properties more obvious by prefixing _
4681 * Added; DBRef support [guille]
4682 * Changed; removed support for multiple collection names per model
4683 * Fixed; no longer applying setters when document returned from db
4684 * Changed; default auto_reconnect to true
4685 * Changed; Query#bind no longer clones the query
4686 * Fixed; Model.update now accepts $pull, $inc and friends (#404)
4687 * Added; virtual type option support [nw]
4688
46891.8.4 / 2011-08-21
4690===================
4691
4692 * Fixed; validation bug when instantiated with non-schema properties (#464) [jmreidy]
4693
46941.8.3 / 2011-08-19
4695===================
4696
4697 * Fixed; regression in connection#open [jshaw86]
4698
46991.8.2 / 2011-08-17
4700===================
4701
4702 * fixed; reset connection.readyState after failure [tomseago]
4703 * fixed; can now query positionally for non-embedded docs (arrays of numbers/strings etc)
4704 * fixed; embedded document query casting
4705 * added; support for passing options to node-mongo-native db, server, and replsetserver [tomseago]
4706
47071.8.1 / 2011-08-10
4708===================
4709
4710 * fixed; ObjectIds were always marked modified
4711 * fixed; can now query using document instances
4712 * fixed; can now query/update using documents with subdocs
4713
47141.8.0 / 2011-08-04
4715===================
4716
4717 * fixed; can now use $all with String and Number
4718 * fixed; can query subdoc array with $ne: null
4719 * fixed; instance.subdocs#id now works with custom _ids
4720 * fixed; do not apply setters when doc returned from db (change in bad behavior)
4721
47221.7.4 / 2011-07-25
4723===================
4724
4725 * fixed; sparse now a valid seperate schema option
4726 * fixed; now catching cast errors in queries
4727 * fixed; calling new Schema with object created in vm.runInNewContext now works (#384) [Sija]
4728 * fixed; String enum was disallowing null
4729 * fixed; Find by nested document _id now works (#389)
4730
47311.7.3 / 2011-07-16
4732===================
4733
4734 * fixed; MongooseArray#indexOf now works with ObjectIds
4735 * fixed; validation scope now set properly (#418)
4736 * fixed; added missing colors dependency (#398)
4737
47381.7.2 / 2011-07-13
4739===================
4740
4741 * changed; node-mongodb-native driver to v0.9.6.7
4742
47431.7.1 / 2011-07-12
4744===================
4745
4746 * changed; roll back node-mongodb-native driver to v0.9.6.4
4747
47481.7.0 / 2011-07-12
4749===================
4750
4751 * fixed; collection name misspelling [mathrawka]
4752 * fixed; 2nd param is required for ReplSetServers [kevinmarvin]
4753 * fixed; MongooseArray behaves properly with Object.keys
4754 * changed; node-mongodb-native driver to v0.9.6.6
4755 * fixed/changed; Mongodb segfault when passed invalid ObjectId (#407)
4756 - This means invalid data passed to the ObjectId constructor will now error
4757
47581.6.0 / 2011-07-07
4759===================
4760
4761 * changed; .save() errors are now emitted on the instances db instead of the instance 9782463fc
4762 * fixed; errors occurring when creating indexes now properly emit on db
4763 * added; $maxDistance support to MongooseArrays
4764 * fixed; RegExps now work with $all
4765 * changed; node-mongodb-native driver to v0.9.6.4
4766 * fixed; model names are now accessible via .modelName
4767 * added; Query#slaveOk support
4768
47691.5.0 / 2011-06-27
4770===================
4771
4772 * changed; saving without a callback no longer ignores the error (@bnoguchi)
4773 * changed; hook-js version bump to 0.1.9
4774 * changed; node-mongodb-native version bumped to 0.9.6.1 - When .remove() doesn't
4775 return an error, null is no longer passed.
4776 * fixed; two memory leaks (@justmoon)
4777 * added; sparse index support
4778 * added; more ObjectId conditionals (gt, lt, gte, lte) (@phillyqueso)
4779 * added; options are now passed in model#remote (@JerryLuke)
4780
47811.4.0 / 2011-06-10
4782===================
4783
4784 * bumped hooks-js dependency (fixes issue passing null as first arg to next())
4785 * fixed; document#inspect now works properly with nested docs
4786 * fixed; 'set' now works as a schema attribute (GH-365)
4787 * fixed; _id is now set properly within pre-init hooks (GH-289)
4788 * added; Query#distinct / Model#distinct support (GH-155)
4789 * fixed; embedded docs now can use instance methods (GH-249)
4790 * fixed; can now overwrite strings conflicting with schema type
4791
47921.3.7 / 2011-06-03
4793===================
4794
4795 * added MongooseArray#splice support
4796 * fixed; 'path' is now a valid Schema pathname
4797 * improved hooks (utilizing https://github.com/bnoguchi/hooks-js)
4798 * fixed; MongooseArray#$shift now works (never did)
4799 * fixed; Document.modified no longer throws
4800 * fixed; modifying subdoc property sets modified paths for subdoc and parent doc
4801 * fixed; marking subdoc path as modified properly persists the value to the db
4802 * fixed; RexExps can again be saved ( #357 )
4803
48041.3.6 / 2011-05-18
4805===================
4806
4807 * fixed; corrected casting for queries against array types
4808 * added; Document#set now accepts Document instances
4809
48101.3.5 / 2011-05-17
4811===================
4812
4813 * fixed; $ne queries work properly with single vals
4814 * added; #inspect() methods to improve console.log output
4815
48161.3.4 / 2011-05-17
4817===================
4818
4819 * fixed; find by Date works as expected (#336)
4820 * added; geospatial 2d index support
4821 * added; support for $near (#309)
4822 * updated; node-mongodb-native driver
4823 * fixed; updating numbers work (#342)
4824 * added; better error msg when try to remove an embedded doc without an _id (#307)
4825 * added; support for 'on-the-fly' schemas (#227)
4826 * changed; virtual id getters can now be skipped
4827 * fixed; .index() called on subdoc schema now works as expected
4828 * fixed; db.setProfile() now buffers until the db is open (#340)
4829
48301.3.3 / 2011-04-27
4831===================
4832
4833 * fixed; corrected query casting on nested mixed types
4834
48351.3.2 / 2011-04-27
4836===================
4837
4838 * fixed; query hints now retain key order
4839
48401.3.1 / 2011-04-27
4841===================
4842
4843 * fixed; setting a property on an embedded array no longer overwrites entire array (GH-310)
4844 * fixed; setting nested properties works when sibling prop is named "type"
4845 * fixed; isModified is now much finer grained when .set() is used (GH-323)
4846 * fixed; mongoose.model() and connection.model() now return the Model (GH-308, GH-305)
4847 * fixed; can now use $gt, $lt, $gte, $lte with String schema types (GH-317)
4848 * fixed; .lowercase() -> .toLowerCase() in pluralize()
4849 * fixed; updating an embedded document by index works (GH-334)
4850 * changed; .save() now passes the instance to the callback (GH-294, GH-264)
4851 * added; can now query system.profile and system.indexes collections
4852 * added; db.model('system.profile') is now included as a default Schema
4853 * added; db.setProfiling(level, ms, callback)
4854 * added; Query#hint() support
4855 * added; more tests
4856 * updated node-mongodb-native to 0.9.3
4857
48581.3.0 / 2011-04-19
4859===================
4860
4861 * changed; save() callbacks now fire only once on failed validation
4862 * changed; Errors returned from save() callbacks now instances of ValidationError
4863 * fixed; MongooseArray#indexOf now works properly
4864
48651.2.0 / 2011-04-11
4866===================
4867
4868 * changed; MongooseNumber now casts empty string to null
4869
48701.1.25 / 2011-04-08
4871===================
4872
4873 * fixed; post init now fires at proper time
4874
48751.1.24 / 2011-04-03
4876===================
4877
4878 * fixed; pushing an array onto an Array works on existing docs
4879
48801.1.23 / 2011-04-01
4881===================
4882
4883 * Added Model#model
4884
48851.1.22 / 2011-03-31
4886===================
4887
4888 * Fixed; $in queries on mixed types now work
4889
48901.1.21 / 2011-03-31
4891===================
4892
4893 * Fixed; setting object root to null/undefined works
4894
48951.1.20 / 2011-03-31
4896===================
4897
4898 * Fixed; setting multiple props on null field works
4899
49001.1.19 / 2011-03-31
4901===================
4902
4903 * Fixed; no longer using $set on paths to an unexisting fields
4904
49051.1.18 / 2011-03-30
4906===================
4907
4908 * Fixed; non-mixed type object setters work after initd from null
4909
49101.1.17 / 2011-03-30
4911===================
4912
4913 * Fixed; nested object property access works when root initd with null value
4914
49151.1.16 / 2011-03-28
4916===================
4917
4918 * Fixed; empty arrays are now saved
4919
49201.1.15 / 2011-03-28
4921===================
4922
4923 * Fixed; `null` and `undefined` are set atomically.
4924
49251.1.14 / 2011-03-28
4926===================
4927
4928 * Changed; more forgiving date casting, accepting '' as null.
4929
49301.1.13 / 2011-03-26
4931===================
4932
4933 * Fixed setting values as `undefined`.
4934
49351.1.12 / 2011-03-26
4936===================
4937
4938 * Fixed; nested objects now convert to JSON properly
4939 * Fixed; setting nested objects directly now works
4940 * Update node-mongodb-native
4941
49421.1.11 / 2011-03-25
4943===================
4944
4945 * Fixed for use of `type` as a key.
4946
49471.1.10 / 2011-03-23
4948===================
4949
4950 * Changed; Make sure to only ensure indexes while connected
4951
49521.1.9 / 2011-03-2
4953==================
4954
4955 * Fixed; Mixed can now default to empty arrays
4956 * Fixed; keys by the name 'type' are now valid
4957 * Fixed; null values retrieved from the database are hydrated as null values.
4958 * Fixed repeated atomic operations when saving a same document twice.
4959
49601.1.8 / 2011-03-23
4961==================
4962
4963 * Fixed 'id' overriding. [bnoguchi]
4964
49651.1.7 / 2011-03-22
4966==================
4967
4968 * Fixed RegExp query casting when querying against an Array of Strings [bnoguchi]
4969 * Fixed getters/setters for nested virtualsl. [bnoguchi]
4970
49711.1.6 / 2011-03-22
4972==================
4973
4974 * Only doValidate when path exists in Schema [aheckmann]
4975 * Allow function defaults for Array types [aheckmann]
4976 * Fix validation hang [aheckmann]
4977 * Fix setting of isRequired of SchemaType [aheckmann]
4978 * Fix SchemaType#required(false) filter [aheckmann]
4979 * More backwards compatibility [aheckmann]
4980 * More tests [aheckmann]
4981
49821.1.5 / 2011-03-14
4983==================
4984
4985 * Added support for `uri, db, fn` and `uri, fn` signatures for replica sets.
4986 * Improved/extended replica set tests.
4987
49881.1.4 / 2011-03-09
4989==================
4990
4991 * Fixed; running an empty Query doesn't throw. [aheckmann]
4992 * Changed; Promise#addBack returns promise. [aheckmann]
4993 * Added streaming cursor support. [aheckmann]
4994 * Changed; Query#update defaults to use$SetOnSave now. [brian]
4995 * Added more docs.
4996
49971.1.3 / 2011-03-04
4998==================
4999
5000 * Added Promise#resolve [aheckmann]
5001 * Fixed backward compatibility with nulls [aheckmann]
5002 * Changed; Query#{run,exec} return promises [aheckmann]
5003
50041.1.2 / 2011-03-03
5005==================
5006
5007 * Restored Query#exec and added notion of default operation [brian]
5008 * Fixed ValidatorError messages [brian]
5009
50101.1.1 / 2011-03-01
5011==================
5012
5013 * Added SchemaType String `lowercase`, `uppercase`, `trim`.
5014 * Public exports (`Model`, `Document`) and tests.
5015 * Added ObjectId casting support for `Document`s.
5016
50171.1.0 / 2011-02-25
5018==================
5019
5020 * Added support for replica sets.
5021
50221.0.16 / 2011-02-18
5023===================
5024
5025 * Added $nin as another whitelisted $conditional for SchemaArray [brian]
5026 * Changed #with to #where [brian]
5027 * Added ability to use $in conditional with Array types [brian]
5028
50291.0.15 / 2011-02-18
5030===================
5031
5032 * Added `id` virtual getter for documents to easily access the hexString of
5033 the `_id`.
5034
50351.0.14 / 2011-02-17
5036===================
5037
5038 * Fix for arrays within subdocuments [brian]
5039
50401.0.13 / 2011-02-16
5041===================
5042
5043 * Fixed embedded documents saving.
5044
50451.0.12 / 2011-02-14
5046===================
5047
5048 * Minor refactorings [brian]
5049
50501.0.11 / 2011-02-14
5051===================
5052
5053 * Query refactor and $ne, $slice, $or, $size, $elemMatch, $nin, $exists support [brian]
5054 * Named scopes sugar [brian]
5055
50561.0.10 / 2011-02-11
5057===================
5058
5059 * Updated node-mongodb-native driver [thanks John Allen]
5060
50611.0.9 / 2011-02-09
5062==================
5063
5064 * Fixed single member arrays as defaults [brian]
5065
50661.0.8 / 2011-02-09
5067==================
5068
5069 * Fixed for collection-level buffering of commands [gitfy]
5070 * Fixed `Document#toJSON` [dalejefferson]
5071 * Fixed `Connection` authentication [robrighter]
5072 * Fixed clash of accessors in getters/setters [eirikurn]
5073 * Improved `Model#save` promise handling
5074
50751.0.7 / 2011-02-05
5076==================
5077
5078 * Fixed memory leak warnings for test suite on 0.3
5079 * Fixed querying documents that have an array that contain at least one
5080 specified member. [brian]
5081 * Fixed default value for Array types (fixes GH-210). [brian]
5082 * Fixed example code.
5083
50841.0.6 / 2011-02-03
5085==================
5086
5087 * Fixed `post` middleware
5088 * Fixed; it's now possible to instantiate a model even when one of the paths maps
5089 to an undefined value [brian]
5090
50911.0.5 / 2011-02-02
5092==================
5093
5094 * Fixed; combo $push and $pushAll auto-converts into a $pushAll [brian]
5095 * Fixed; combo $pull and $pullAll auto-converts to a single $pullAll [brian]
5096 * Fixed; $pullAll now removes said members from array before save (so it acts just
5097 like pushAll) [brian]
5098 * Fixed; multiple $pulls and $pushes become a single $pullAll and $pushAll.
5099 Moreover, $pull now modifies the array before save to reflect the immediate
5100 change [brian]
5101 * Added tests for nested shortcut getters [brian]
5102 * Added tests that show that Schemas with nested Arrays don't apply defaults
5103 [brian]
5104
51051.0.4 / 2011-02-02
5106==================
5107
5108 * Added MongooseNumber#toString
5109 * Added MongooseNumber unit tests
5110
51111.0.3 / 2011-02-02
5112==================
5113
5114 * Make sure safe mode works with Model#save
5115 * Changed Schema options: safe mode is now the default
5116 * Updated node-mongodb-native to HEAD
5117
51181.0.2 / 2011-02-02
5119==================
5120
5121 * Added a Model.create shortcut for creating documents. [brian]
5122 * Fixed; we can now instantiate models with hashes that map to at least one
5123 null value. [brian]
5124 * Fixed Schema with more than 2 nested levels. [brian]
5125
51261.0.1 / 2011-02-02
5127==================
5128
5129 * Improved `MongooseNumber`, works almost like the native except for `typeof`
5130 not being `'number'`.