UNPKG

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