PageRenderTime 92ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/node_modules/mongoose/History.md

https://bitbucket.org/coleman333/smartsite
Markdown | 4190 lines | 3568 code | 622 blank | 0 comment | 0 complexity | 095d0d73b30bce2f2fdc9559a60ce18c MD5 | raw file
Possible License(s): Apache-2.0, JSON, BSD-3-Clause, 0BSD, MIT, CC-BY-SA-3.0
  1. 5.0.14 / 2018-04-09
  2. ===================
  3. * fix(schema): clone aliases and alternative option syntax correctly
  4. * fix(query): call utils.toObject in query.count like in query.find #6325 [lineus](https://github.com/lineus)
  5. * docs(populate): add middleware examples #6320 [BorntraegerMarc](https://github.com/BorntraegerMarc)
  6. * docs(compatibility): fix dead link #6319 [lacivert](https://github.com/lacivert)
  7. * docs(api): fix markdown parsing for parameters #6318 #6314 [lineus](https://github.com/lineus)
  8. * fix(populate): handle space-delimited paths in array populate #6296 #6284 [lineus](https://github.com/lineus)
  9. * fix(populate): support basic virtual populate underneath embedded discriminators #6273
  10. 5.0.13 / 2018-04-05
  11. ===================
  12. * docs(faq): add middleware to faq arrow function warning #6309 [lineus](https://github.com/lineus)
  13. * docs(schema): add example to loadClass() docs #6308
  14. * docs: clean up misc typos #6304 [sfrieson](https://github.com/sfrieson)
  15. * fix(document): apply virtuals when calling `toJSON()` on a nested path #6294
  16. * refactor(connection): use `client.db()` syntax rather than double-parsing the URI #6292 #6286
  17. * docs: document new behavior of required validator for arrays #6288 [daltones](https://github.com/daltones)
  18. * fix(schema): treat set() options as user-provided options #6274
  19. * fix(schema): clone discriminators correctly #6274
  20. * fix(update): make setDefaultsOnInsert not create subdoc if only default is id #6269
  21. * docs(discriminator): clarify 3rd argument to Model.discriminator() #2596
  22. 5.0.12 / 2018-03-27
  23. ===================
  24. * docs(query): updating model name in query API docs #6280 [lineus](https://github.com/lineus)
  25. * docs: fix typo in tests #6275 [styler](https://github.com/styler)
  26. * fix: add missing `.hint()` to aggregate #6272 #6251 [lineus](https://github.com/lineus)
  27. * docs(api): add headers to each API docs section for easer nav #6261
  28. * fix(query): ensure hooked query functions always run on next tick for chaining #6250
  29. * fix(populate): ensure populated array not set to null if it isn't set #6245
  30. * fix(connection): set readyState to disconnected if initial connection fails #6244 #6131
  31. * docs(model): make `create()` params show up correctly in docs #6242
  32. * fix(model): make error handlers work with MongoDB server errors and `insertMany()` #6228
  33. * fix(browser): ensure browser document builds defaults for embedded arrays correctly #6175
  34. * fix(timestamps): set timestamps when using `updateOne()` and `updateMany()` #6282 [gualopezb](https://github.com/gualopezb)
  35. 5.0.11 / 2018-03-19
  36. ===================
  37. * fix(update): handle $pull with $in in update validators #6240
  38. * fix(query): don't convert undefined to null when casting so driver `ignoreUndefined` option works #6236
  39. * docs(middleware): add example of using async/await with middleware #6235
  40. * fix(populate): apply justOne option before `completeMany()` so it works with lean() #6234
  41. * fix(query): ensure errors in user callbacks aren't caught in init #6195 #6178
  42. * docs(connections): document dbName option for Atlas connections #6179
  43. * fix(discriminator): make child schema nested paths overwrite parent schema paths #6076
  44. 4.13.12 / 2018-03-13
  45. ====================
  46. * fix(document): make virtual get() return undefined instead of null if no getters #6223
  47. * docs: fix url in useMongoClient error message #6219 #6217 [lineus](https://github.com/lineus)
  48. * fix(discriminator): don't copy `discriminators` property from base schema #6122 #6064
  49. 5.0.10 / 2018-03-12
  50. ===================
  51. * docs(schematype): add notes re: running setters on queries #6209
  52. * docs: fix typo #6208 [kamagatos](https://github.com/kamagatos)
  53. * fix(query): only call setters once on query filter props for findOneAndUpdate and findOneAndRemove #6203
  54. * docs: elaborate on connection string changes in migration guide #6193
  55. * fix(document): skip applyDefaults if subdoc is null #6187
  56. * docs: fix schematypes docs and link to them #6176
  57. * docs(faq): add FAQs re: array defaults and casting aggregation pipelines #6184 #6176 #6170 [lineus](https://github.com/lineus)
  58. * fix(document): ensure primitive defaults are set and built-in default functions run before setters #6155
  59. * fix(query): handle single embedded embedded discriminators in castForQuery #6027
  60. 5.0.9 / 2018-03-05
  61. ==================
  62. * perf: bump mongodb -> 3.0.4 to fix SSL perf issue #6065
  63. 5.0.8 / 2018-03-03
  64. ==================
  65. * docs: remove obsolete references to `emitIndexErrors` #6186 [isaackwan](https://github.com/isaackwan)
  66. * fix(query): don't cast findOne() until exec() so setters don't run twice #6157
  67. * fix: remove document_provider.web.js file #6186
  68. * fix(discriminator): support custom discriminator model names #6100 [wentout](https://github.com/wentout)
  69. * fix: support caching calls to `useDb()` #6036 [rocketspacer](https://github.com/rocketspacer)
  70. * fix(query): add omitUndefined option so setDefaultsOnInsert can kick in on undefined #6034
  71. * fix: upgrade mongodb -> 3.0.3 for reconnectTries: 0 blocking process exit fix #6028
  72. 5.0.7 / 2018-02-23
  73. ==================
  74. * fix: support eachAsync options with aggregation cursor #6169 #6168 [vichle](https://github.com/vichle)
  75. * docs: fix link to MongoDB compound indexes docs #6162 [br0p0p](https://github.com/br0p0p)
  76. * docs(aggregate): use eachAsync instead of incorrect `each()` #6160 [simllll](https://github.com/simllll)
  77. * chore: fix benchmarks #6158 [pradel](https://github.com/pradel)
  78. * docs: remove dead link to old blog post #6154 [markstos](https://github.com/markstos)
  79. * fix: don't convert dates to numbers when updating mixed path #6146 #6145 [s4rbagamble](https://github.com/s4rbagamble)
  80. * feat(aggregate): add replaceRoot, count, sortByCount helpers #6142 [jakesjews](https://github.com/jakesjews)
  81. * fix(document): add includedChildren flag to modifiedPaths() #6134
  82. * perf: don't create wrapper function if no hooks specified #6126
  83. * fix(schema): allow indexes on single nested subdocs for geoJSON #6113
  84. * fix(document): allow depopulating all fields #6073
  85. * feat(mongoose): add support for `useFindAndModify` option on singleton #5616
  86. 5.0.6 / 2018-02-15
  87. ==================
  88. * refactor(query.castUpdate): avoid creating error until necessary #6137
  89. * docs(api): fix missing api docs #6136 [lineus](https://github.com/lineus)
  90. * fix(schema): copy virtuals when using `clone()` #6133
  91. * fix(update): avoid digging into buffers with upsert and replaceOne #6124
  92. * fix(schema): support `enum` on arrays of strings #6102
  93. * fix(update): cast `$addToSet: [1, 2]` -> `$addToSet: { $each: [1, 2] }` #6086
  94. 5.0.5 / 2018-02-13
  95. ==================
  96. * docs: make > show up correctly in API docs #6114
  97. * fix(query): support `where()` overwriting primitive with object #6097
  98. * fix(schematype): don't run internal `resetId` setter on queries with _id #6093
  99. * fix(discriminator): don't copy `discriminators` property from base schema #6064
  100. * fix(utils): respect `valueOf()` when merging object for update #6059
  101. * docs(validation): fix typo 'maxLength' #4720
  102. * fix(document): apply defaults after setting initial value so default functions don't see empty doc #3781
  103. 5.0.4 / 2018-02-08
  104. ==================
  105. * docs: add lambda guide #6107
  106. * fix(connection): add `dbName` option to work around `mongodb+srv` not supporting db name in URI #6106
  107. * fix(schematype): fix regexp typo in ObjectId #6098 [JoshuaWise](https://github.com/JoshuaWise)
  108. * perf(document): re-use the modifiedPaths list #6092 [tarun1793](https://github.com/tarun1793)
  109. * fix: use console.info() instead of console.error() for debug output #6088 [yuristsepaniuk](https://github.com/yuristsepaniuk)
  110. * docs(validation): clean up runValidators and isAsync options docs for 5.x #6083
  111. * docs(model): use array instead of spread consistently for aggregate() #6070
  112. * fix(schema): make aliases handle mongoose-lean-virtuals #6069
  113. * docs(layout): add link to subdocs guide #6056
  114. * fix(query): make strictQuery: true strip out fields that aren't in the schema #6032
  115. * docs(guide): add notes for `strictQuery` option #6032
  116. 4.13.11 / 2018-02-07
  117. ====================
  118. * docs: fix links in 4.x docs #6081
  119. * chore: add release script that uses --tag for npm publish for 4.x releases #6063
  120. 5.0.3 / 2018-01-31
  121. ==================
  122. * fix: consistently use process.nextTick() to avoid sinon.useFakeTimers() causing ops to hang #6074
  123. * docs(aggregate): fix typo #6072 [adursun](https://github.com/adursun)
  124. * chore: add return type to `mongoose.model()` docs [bryant1410](https://github.com/bryant1410)
  125. * fix(document): depopulate push()-ed docs when saving #6048
  126. * fix: upgrade mongodb -> 3.0.2 #6019
  127. 5.0.2 / 2018-01-28
  128. ==================
  129. * fix(schema): do not overwrite default values in schema when nested timestamps are provided #6024 [cdeveas](https://github.com/cdeveas)
  130. * docs: fix syntax highlighting in models.jade, schematypes.jade, subdocs.jade #6058 [lineus](https://github.com/lineus)
  131. * fix: use lazy loading so we can build mongoose with webpack #5993 #5842
  132. * docs(connections): clarify multi-mongos with useMongoClient for 4.x docs #5984
  133. * fix(populate): handle populating embedded discriminator paths #5970
  134. 4.13.10 / 2018-01-28
  135. ====================
  136. * docs(model+query): add lean() option to Model helpers #5996 [aguyinmontreal](https://github.com/aguyinmontreal)
  137. * fix: use lazy loading so we can build mongoose with webpack #5993 #5842
  138. * docs(connections): clarify multi-mongos with useMongoClient for 4.x docs #5984
  139. * fix(populate): handle populating embedded discriminator paths #5970
  140. * docs(query+aggregate): add more detail re: maxTimeMS #4066
  141. 5.0.1 / 2018-01-19
  142. ==================
  143. * fix(document): make validate() not resolve to document #6014
  144. * fix(model): make save() not return DocumentNotFoundError if using fire-and-forget writes #6012
  145. * fix(aggregate): make options() work as advertised #6011 [spederiva](https://github.com/spederiva)
  146. * docs(queries): fix code samples #6008
  147. 5.0.0 / 2018-01-17
  148. ==================
  149. * test: refactor tests to use start fewer connections #5985 [fenanquin](https://github.com/fenanquin)
  150. * feat: add global bufferCommands option #5879
  151. * docs: new docs site and build system #5976
  152. * test: increase timeout on slow test cases #5968 [fenanquin](https://github.com/fenanquin)
  153. * fix: avoid casting out array filter elements #5965
  154. * feat: add Model.watch() wrapper #5964
  155. * chore: replace istanbul with nyc #5962 [ChristianMurphy](https://github.com/ChristianMurphy)
  156. 4.13.9 / 2018-01-07
  157. ===================
  158. * chore: update marked (dev dependency) re: security vulnerability #5951 [ChristianMurphy](https://github.com/ChristianMurphy)
  159. * fix: upgrade mongodb -> 2.2.34 for ipv6 and autoReconnect fixes #5794 #5760
  160. * docs: use useMongooseAggCursor for aggregate docs #2955
  161. 5.0.0-rc2 / 2018-01-04
  162. ======================
  163. * fix: add cleaner warning about no longer needing `useMongoClient` in 5.x #5961
  164. * chore: update acquit -> 0.5.1 for minor security patch #5961 [ChristianMurphy](https://github.com/ChristianMurphy)
  165. * docs: add docs for mongoose 4.x at http://mongoosejs.com/docs/4.x #5959
  166. * docs: add link to migration guide #5957
  167. * chore: update eslint to version 4.14.0 #5955 [ChristianMurphy](https://github.com/ChristianMurphy)
  168. * chore: update mocha to version 4.1.0 [ChristianMurphy](https://github.com/ChristianMurphy)
  169. 5.0.0-rc1 / 2018-01-02
  170. ======================
  171. * fix(index): use pluralize correctly for `mongoose.model()` #5958
  172. * fix: make mquery use native promises by default #5945
  173. * fix(connection): ensure 'joined' and 'left' events get bubbled up #5944
  174. 5.0.0-rc0 / 2017-12-28
  175. ======================
  176. * BREAKING CHANGE: always use mongoose aggregation cursor when using `.aggregate().cursor()` #5941
  177. * BREAKING CHANGE: attach query middleware when compiling model #5939
  178. * BREAKING CHANGE: `emitIndexErrors` is on by default, failing index build will throw uncaught error if not handled #5910
  179. * BREAKING CHANGE: remove precompiled browser bundle #5895
  180. * feat: add `mongoose.pluralize()` function #5877
  181. * BREAKING CHANGE: remove `passRawResult` option for `findOneAndUpdate`, use `rawResult` #5869
  182. * BREAKING CHANGE: implicit async validators (based on number of function args) are removed, return a promise instead #5824
  183. * BREAKING CHANGE: fail fast if user sets a unique index on `_id` #5820 [varunjayaraman](https://github.com/varunjayaraman)
  184. * BREAKING CHANGE: mapReduce resolves to an object with 2 keys rather than 2 separate args #5816
  185. * BREAKING CHANGE: `mongoose.connect()` returns a promise, removed MongooseThenable #5796
  186. * BREAKING CHANGE: query stream removed, use `cursor()` instead #5795
  187. * BREAKING CHANGE: use MongoDB driver 3.0.0, drop support for MongoDB server < 3.0.0 #5791 #4740
  188. * BREAKING CHANGE: remove support for `$pushAll`, remove `usePushEach` option #5670
  189. * BREAKING CHANGE: make date casting use native Date #5395 [varunjayaraman](https://github.com/varunjayaraman)
  190. * BREAKING CHANGE: remove `runSettersOnQuery`, always run setters on query #5340
  191. * BREAKING CHANGE: array of length 0 now satisfies `required: true` for arays #5139 [wlingke](https://github.com/wlingke)
  192. * BREAKING CHANGE: remove `saveErrorIfNotFound`, always error out if `save()` did not update a document #4973
  193. * BREAKING CHANGE: don't execute getters in reverse order #4835
  194. * BREAKING CHANGE: make boolean casting more strict #4245
  195. * BREAKING CHANGE: `toObject()` and `toJSON()` option parameter merges with defaults rather than overwriting #4131
  196. * feat: allow setting `default` on `_id` #4069
  197. * BREAKING CHANGE: `deleteX()` and `remove()` promise resolves to the write object result #4013
  198. * feat: support returning a promise from middleware functions #3779
  199. * BREAKING CHANGE: don't return a promise if callback specified #3670
  200. * BREAKING CHANGE: only cast `update()`, `updateX()`, `replaceOne()`, `remove()`, `deleteX()` in exec #3529
  201. * BREAKING CHANGE: sync errors in middleware functions are now handled #3483
  202. * BREAKING CHANGE: post hooks get flow control #3232
  203. * BREAKING CHANGE: deduplicate hooks when merging discriminator schema #2945
  204. * BREAKING CHANGE: use native promises by default, remove support for mpromise #2917
  205. * BREAKING CHANGE: remove `retainKeyOrder`, always use forward order when iterating through objects #2749
  206. * BREAKING CHANGE: `aggregate()` no longer accepts a spread #2716
  207. 4.13.8 / 2017-12-27
  208. ===================
  209. * docs(guide): use more up-to-date syntax for autoIndex example #5933
  210. * docs: fix grammar #5927 [abagh0703](https://github.com/abagh0703)
  211. * fix: propagate lean options to child schemas #5914
  212. * fix(populate): use correct model with discriminators + nested populate #5858
  213. 4.13.7 / 2017-12-11
  214. ===================
  215. * docs(schematypes): fix typo #5889 [gokaygurcan](https://github.com/gokaygurcan)
  216. * fix(cursor): handle `reject(null)` with eachAsync callback #5875 #5874 [ZacharyRSmith](https://github.com/ZacharyRSmith)
  217. * fix: disallow setting `mongoose.connection` to invalid values #5871 [jinasonlin](https://github.com/jinasonlin)
  218. * docs(middleware): suggest using `return next()` to stop middleware execution #5866
  219. * docs(connection): improve connection string query param docs #5864
  220. * fix(document): run validate hooks on array subdocs even if not directly modified #5861
  221. * fix(discriminator): don't treat $meta as defining projection when querying #5859
  222. * fix(types): handle Decimal128 when using bson-ext on server side #5850
  223. * fix(document): ensure projection with only $slice isn't treated as inclusive for discriminators #4991
  224. * fix(model): throw error when passing non-object to create() #2037
  225. 4.13.6 / 2017-12-02
  226. ===================
  227. * fix(schema): support strictBool option in schema #5856 [ekulabuhov](https://github.com/ekulabuhov)
  228. * fix(update): make upsert option consistently handle truthy values, not just booleans, for updateOne() #5839
  229. * refactor: remove unnecessary constructor check #2057
  230. * docs(query): correct function signature for .mod() helper #1806
  231. * fix(query): report ObjectParameterError when passing non-object as filter to find() and findOne() #1698
  232. 4.13.5 / 2017-11-24
  233. ===================
  234. * fix(model): handle update cast errors correctly with bulkWrite #5845 [Michael77](https://github.com/Michael77)
  235. * docs: add link to bufferCommands option #5844 [ralphite](https://github.com/ralphite)
  236. * fix(model): allow virtual ref function to return arrays #5834 [brunohcastro](https://github.com/brunohcastro)
  237. * fix(query): don't throw uncaught error if query filter too big #5812
  238. * fix(document): if setting unselected nested path, don't overwrite nested path #5800
  239. * fix(document): support calling `populate()` on nested document props #5703
  240. * fix: add `strictBool` option for schema type boolean #5344 #5211 #4245
  241. * docs(faq): add faq re: typeKey #1886
  242. * docs(query): add more detailed docs re: options #1702
  243. 4.13.4 / 2017-11-17
  244. ===================
  245. * fix(aggregate): add chainable .option() helper for setting arbitrary options #5829
  246. * fix(aggregate): add `.pipeline()` helper to get the current pipeline #5825
  247. * docs: grammar fixes for `unique` FAQ #5823 [mfluehr](https://github.com/mfluehr)
  248. * chore: add node 9 to travis #5822 [superheri](https://github.com/superheri)
  249. * fix(model): fix infinite recursion with recursive embedded discriminators #5821 [Faibk](https://github.com/Faibk)
  250. 4.13.3 / 2017-11-15
  251. ===================
  252. * chore: add node 8 to travis #5818 [superheri](https://github.com/superheri)
  253. * fix(document): don't apply transforms to nested docs when updating already saved doc #5807
  254. 4.13.2 / 2017-11-11
  255. ===================
  256. * feat(buffer): add support for subtype prop #5530
  257. 4.13.1 / 2017-11-08
  258. ===================
  259. * fix: accept multiple paths or array of paths to depopulate #5798 #5797 [adamreisnz](https://github.com/adamreisnz)
  260. * fix(document): pass default array as actual array rather than taking first element #5780
  261. * fix(model): increment version when $set-ing it in a save() that requires a version bump #5779
  262. * fix(query): don't explicitly project in discriminator key if user projected in parent path #5775 #5754
  263. * fix(model): cast query option to geoNear() #5765
  264. * fix(query): don't treat projection with just $slice as inclusive #5737
  265. * fix(discriminator): defer applying embedded discriminator hooks until top-level model is compiled #5706
  266. * docs(discriminator): add warning to always attach hooks before calling discriminator() #5706
  267. 4.13.0 / 2017-11-02
  268. ===================
  269. * feat(aggregate): add $addFields helper #5740 [AyushG3112](https://github.com/AyushG3112)
  270. * feat(connection): add connection-level bufferCommands #5720
  271. * feat(connection): add createCollection() helper #5712
  272. * feat(populate): support setting localField and foreignField to functions #5704 #5602
  273. * feat(query): add multipleCastError option for aggregating cast errors when casting update #5609
  274. * feat(populate): allow passing a function to virtual ref #5602
  275. * feat(schema): add excludeIndexes option to optionally prevent collecting indexes from nested schemas #5575
  276. * feat(model): report validation errors from `insertMany()` if using `ordered: false` and `rawResult: true` #5337
  277. * feat(aggregate): add pre/post aggregate middleware #5251
  278. * feat(schema): allow using `set` as a schema path #1939
  279. 4.12.6 / 2017-11-01
  280. ===================
  281. * fix(schema): make clone() copy query helpers correctly #5752
  282. * fix: undeprecate `ensureIndex()` and use it by default #3280
  283. 4.12.5 / 2017-10-29
  284. ===================
  285. * fix(query): correctly handle `$in` and required for $pull and update validators #5744
  286. * feat(aggegate): add $addFields pipeline operator #5740 [AyushG3112](https://github.com/AyushG3112)
  287. * fix(document): catch sync errors in document pre hooks and report as error #5738
  288. * fix(populate): handle slice projections correctly when automatically selecting populated fields #5737
  289. * fix(discriminator): fix hooks for embedded discriminators #5706 [wlingke](https://github.com/wlingke)
  290. * fix(model): throw sane error when customer calls `mongoose.Model()` over `mongoose.model()` #2005
  291. 4.12.4 / 2017-10-21
  292. ===================
  293. * test(plugins): add coverage for idGetter with id as a schema property #5713 [wlingke](https://github.com/wlingke)
  294. * fix(model): avoid copying recursive $$context object when creating discriminator after querying #5721
  295. * fix(connection): ensure connection promise helpers are removed before emitting 'connected' #5714
  296. * docs(schema): add notes about runSettersOnQuery to schema setters #5705
  297. * fix(collection): ensure queued operations run on the next tick #5562
  298. 4.12.3 / 2017-10-16
  299. ===================
  300. * fix(connection): emit 'reconnect' event as well as 'reconnected' for consistency with driver #5719
  301. * fix: correctly bubble up left/joined events for replica set #5718
  302. * fix(connection): allow passing in `autoIndex` as top-level option rather than requiring `config.autoIndex` #5711
  303. * docs(connection): improve docs regarding reconnectTries, autoReconnect, and bufferMaxEntries #5711
  304. * fix(query): handle null with addToSet/push/pull/pullAll update validators #5710
  305. * fix(model): handle setDefaultsOnInsert option for bulkWrite updateOne and updateMany #5708
  306. * fix(query): avoid infinite recursion edge case when cloning a buffer #5702
  307. 4.12.2 / 2017-10-14
  308. ===================
  309. * docs(faq): add FAQ about using arrow functions for getters/setters, virtuals, and methods #5700
  310. * docs(schema): document the childSchemas property and add to public API #5695
  311. * fix(query): don't project in populated field if parent field is already projected in #5669
  312. * fix: bump mongodb -> 2.2.33 for issue with autoReconnect #4513
  313. 4.12.1 / 2017-10-08
  314. ===================
  315. * fix(document): create new doc when setting single nested, no more set() on copy of priorVal #5693
  316. * fix(model): recursively call applyMethods on child schemas for global plugins #5690
  317. * docs: fix bad promise lib example on home page #5686
  318. * fix(query): handle false when checking for inclusive/exclusive projection #5685
  319. * fix(discriminator): allow reusing child schema #5684
  320. * fix: make addToSet() on empty array with subdoc trigger manual population #5504
  321. 4.12.0 / 2017-10-02
  322. ===================
  323. * docs(validation): add docs coverage for ValidatorError.reason #5681
  324. * feat(discriminator): always add discriminatorKey to base schema to allow updating #5613
  325. * fix(document): make nested docs no longer inherit parent doc's schema props #5586 #5546 #5470
  326. * feat(query): run update validators on $pull and $pullAll #5555
  327. * feat(query): add .error() helper to query to error out in pre hooks #5520
  328. * feat(connection): add dropCollection() helper #5393
  329. * feat(schema): add schema-level collation option #5295
  330. * feat(types): add `discriminator()` function for single nested subdocs #5244
  331. * feat(document): add $isDeleted() getter/setter for better support for soft deletes #4428
  332. * feat(connection): bubble up reconnectFailed event when driver gives up reconnecting #4027
  333. * fix(query): report error if passing array or other non-object as filter to update query #3677
  334. * fix(collection): use createIndex() instead of deprecated ensureIndex() #3280
  335. 4.11.14 / 2017-09-30
  336. ====================
  337. * chore: add nsp check to the CI build #5679 [hairyhenderson](https://github.com/hairyhenderson)
  338. * fix: bump mquery because of security issue with debug package #5677 #5675 [jonathanprl](https://github.com/jonathanprl)
  339. * fix(populate): automatically select() populated()-ed fields #5669
  340. * fix(connection): make force close work as expected #5664
  341. * fix(document): treat $elemMatch as inclusive projection #5661
  342. * docs(model/query): clarify which functions fire which middleware #5654
  343. * fix(model): make `init()` public and return a promise that resolves when indexes are done building #5563
  344. 4.11.13 / 2017-09-24
  345. ====================
  346. * fix(query): correctly run replaceOne with update validators #5665 [sime1](https://github.com/sime1)
  347. * fix(schema): replace mistype in setupTimestamp method #5656 [zipp3r](https://github.com/zipp3r)
  348. * fix(query): avoid throwing cast error for strict: throw with nested id in query #5640
  349. * fix(model): ensure class gets combined schema when using class syntax with discriminators #5635
  350. * fix(document): handle setting doc array to array of top-level docs #5632
  351. * fix(model): handle casting findOneAndUpdate() with overwrite and upsert #5631
  352. * fix(update): correctly handle $ in updates #5628
  353. * fix(types): handle manual population consistently for unshift() and splice() #5504
  354. 4.11.12 / 2017-09-18
  355. ====================
  356. * docs(model): asterisk should not render as markdown bullet #5644 [timkinnane](https://github.com/timkinnane)
  357. * docs: use useMongoClient in connection example #5627 [GabrielNicolasAvellaneda](https://github.com/GabrielNicolasAvellaneda)
  358. * fix(connection): call callback when initial connection failed #5626
  359. * fix(query): apply select correctly if a given nested schema is used for 2 different paths #5603
  360. * fix(document): add graceful fallback for setting a doc array value and `pull()`-ing a doc #3511
  361. 4.11.11 / 2017-09-10
  362. ====================
  363. * fix(connection): properly set readyState in response to driver 'close' and 'reconnect' events #5604
  364. * fix(document): ensure single embedded doc setters only get called once, with correct value #5601
  365. * fix(timestamps): allow enabling updatedAt without createdAt #5598
  366. * test: improve unique validator test by making create run before ensureIndex #5595 #5562
  367. * fix(query): ensure find callback only gets called once when post init hook throws error #5592
  368. 4.11.10 / 2017-09-03
  369. ====================
  370. * docs: add KeenIO tracking #5612
  371. * fix(schema): ensure validators declared with `.validate()` get copied with clone() #5607
  372. * fix: remove unnecessary jest warning #5480
  373. * fix(discriminator): prevent implicit discriminator schema id from clobbering base schema custom id #5591
  374. * fix(schema): hide schema objectid warning for non-hex strings of length 24 #5587
  375. * docs(populate): use story schema defined key author instead of creator #5578 [dmric](https://github.com/dmric)
  376. * docs(document): describe usage of `.set()` #5576
  377. * fix(document): ensure correct scope in single nested validators #5569
  378. * fix(populate): don't mark path as populated until populate() is done #5564
  379. * fix(document): make push()-ing a doc onto an empty array act as manual population #5504
  380. * fix(connection): emit timeout event on socket timeout #4513
  381. 4.11.9 / 2017-08-27
  382. ===================
  383. * fix(error): avoid using arguments.callee because that breaks strict mode #5572
  384. * docs(schematypes): fix spacing #5567
  385. * fix(query): enforce binary subtype always propagates to mongodb #5551
  386. * fix(query): only skip castForQuery for mongoose arrays #5536
  387. * fix(browser): rely on browser entrypoint to decide whether to use BrowserDocument or NodeDocument #5480
  388. 4.11.8 / 2017-08-23
  389. ===================
  390. * feat: add warning about using schema ObjectId as type ObjectId #5571 [efkan](https://github.com/efkan)
  391. * fix(schema): allow setting `id` property after schema was created #5570 #5548
  392. * docs(populate): remove confusing _ from populate docs #5560
  393. * fix(connection): expose parsed uri fields (host, port, dbname) when using openUri() #5556
  394. * docs: added type boolean to options documentation #5547 [ndabAP](https://github.com/ndabAP)
  395. * test: add test coverage for stopping/starting server #5524
  396. * fix(aggregate): pull read preference from schema by default #5522
  397. 4.11.7 / 2017-08-14
  398. ===================
  399. * fix: correct properties when calling toJSON() on populated virtual #5544 #5442 [davidwu226](https://github.com/davidwu226)
  400. * docs: fix spelling #5535 [et](https://github.com/et)
  401. * fix(error): always set name before stack #5533
  402. * fix: add warning about running jest in jsdom environment #5532 #5513 #4943
  403. * fix(document): ensure overwriting a doc array cleans out individual docs #5523
  404. * fix(schema): handle creating arrays of single nested using type key #5521
  405. * fix: upgrade mongodb -> 2.2.31 to support user/pass options #5419
  406. 4.11.6 / 2017-08-07
  407. ===================
  408. * fix: limiting number of async operations per time in insertMany #5529 [andresattler](https://github.com/andresattler)
  409. * fix: upgrade mongodb -> 2.2.30 #5517
  410. * fix(browserDocument): prevent stack overflow caused by double-wrapping embedded doc save() in jest #5513
  411. * fix(document): clear single nested doc when setting to empty object #5506
  412. * fix(connection): emit reconnected and disconnected events correctly with useMongoClient #5498
  413. * fix(populate): ensure nested virtual populate gets set even if top-level property is null #5431
  414. 4.11.5 / 2017-07-30
  415. ===================
  416. * docs: fix link to $lookup #5516 [TalhaAwan](https://github.com/TalhaAwan)
  417. * fix: better parallelization for eachAsync #5502 [lchenay](https://github.com/lchenay)
  418. * docs(document): copy docs for save from model to doc #5493
  419. * fix(document): handle dotted virtuals in toJSON output #5473
  420. * fix(populate): restore user-provided limit after mutating so cursor() works with populate limit #5468
  421. * fix(query): don't throw StrictModeError if geo query with upsert #5467
  422. * fix(populate): propagate readPreference from query to populate queries by default #5460
  423. * docs: warn not to use arrow functions for statics and methods #5458
  424. * fix(query): iterate over all condition keys for setDefaultsOnInsert #5455
  425. * docs(connection): clarify server/replset/mongos option deprecation with useMongoClient #5442
  426. 4.11.4 / 2017-07-23
  427. ===================
  428. * fix: handle next() errors in `eachAsync()` #5486 [lchenay](https://github.com/lchenay)
  429. * fix(schema): propagate runSettersOnQuery option to implicitly created schemas #5479 [https://github.com/ValYouW]
  430. * fix(query): run castConditions() correctly in update ops #5477
  431. * fix(query): ensure castConditions called for findOne and findOneAnd* #5477
  432. * docs: clarify relationship between $lookup and populate #5475 [TalhaAwan](https://github.com/TalhaAwan)
  433. * test: add coverage for arrays of arrays [zbjornson](https://github.com/zbjornson)
  434. * fix(middleware): ensure that error handlers for save get doc as 2nd param #5466
  435. * fix: handle strict: false correctly #5454 #5453 [wookieb](https://github.com/wookieb)
  436. * fix(query): apply schema excluded paths if only projection is a $slice #5450
  437. * fix(query): correct discriminator handling for schema `select: false` fields in schema #5448
  438. * fix(cursor): call next() in series when parallel option used #5446
  439. * chore: load bundled driver first to avoid packaging problem #5443 [prototypeme](https://github.com/prototypeme)
  440. * fix(query): defer condition casting until final exec #5434
  441. * fix(aggregate): don't rely on mongodb aggregate to put a cursor in the callback #5394
  442. * docs(aggregate): add useMongooseAggCursor docs #5394
  443. * docs(middleware): clarify context for document, query, and model middleware #5381
  444. 4.11.3 / 2017-07-14
  445. ===================
  446. * fix(connection): remove .then() before resolving to prevent infinite recursion #5471
  447. 4.11.2 / 2017-07-13
  448. ===================
  449. * docs: fix comment typo in connect example #5435 [ConnorMcF](https://github.com/ConnorMcF)
  450. * fix(update): correctly cast document array in update validators with exec() #5430
  451. * fix(connection): handle autoIndex with useMongoClient #5423
  452. * fix(schema): handle `type: [Array]` in schemas #5416
  453. * fix(timestamps): if overwrite is set and there's a $set, use $set instead of top-level update #5413
  454. * fix(document): don't double-validate deeply nested doc array elements #5411
  455. * fix(schematype): clone default objects so default not shared across object instances unless `shared` specified #5407
  456. * fix(document): reset down the nested subdocs when resetting parent doc #5406
  457. * fix: don't pass error arg twice to error handlers #5405
  458. * fix(connection): make openUri() return connection decorated with then() and catch() #5404
  459. * fix: enforce $set on an array must be an array #5403
  460. * fix(document): don't crash if calling `validateSync()` after overwriting doc array index #5389
  461. * fix(discriminator): ensure discriminator key doesn't count as user-selected field for projection #4629
  462. 4.11.1 / 2017-07-02
  463. ===================
  464. * docs: populate virtuals fix justOne description #5427 [fredericosilva](https://github.com/fredericosilva)
  465. * fix(connection): make sure to call onOpen in openUri() #5404
  466. * docs(query): justOne is actually single, and it default to false #5402 [zbjornson](https://github.com/zbjornson)
  467. * docs: fix small typo in lib/schema.js #5398 #5396 [pjo336](https://github.com/pjo336)
  468. * fix: emit remove on single nested subdocs when removing parent #5388
  469. * fix(update): handle update with defaults and overwrite but no update validators #5384
  470. * fix(populate): handle undefined refPath values in middle of array #5377
  471. * fix(document): ensure consistent setter context for single nested #5363
  472. * fix(query): support runSettersOnQuery as query option #5350
  473. 4.11.0 / 2017-06-25
  474. ===================
  475. * feat(query): execute setters with query as context for `runSettersOnQuery` #5339
  476. * feat(model): add translateAliases function #5338 [rocketspacer](https://github.com/rocketspacer)
  477. * feat(connection): add `useMongoClient` and `openUri` functions, deprecate current connect logic #5304
  478. * refactor(schema): make id virtual not access doc internals #5279
  479. * refactor: handle non-boolean lean #5279
  480. * feat(cursor): add addCursorFlag() support to query and agg cursors #4814
  481. * feat(cursor): add parallel option to eachAsync #4244
  482. * feat(schema): allow setting custom error constructor for custom validators #4009
  483. 4.10.8 / 2017-06-21
  484. ===================
  485. * docs: fix small formatting typo on schematypes #5374 [gianpaj](https://github.com/gianpaj)
  486. * fix(model): allow null as an _id #5370
  487. * fix(populate): don't throw async uncaught exception if model not found in populate #5364
  488. * fix: correctly cast decimals in update #5361
  489. * fix(error): don't use custom getter for ValidationError message #5359
  490. * fix(query): handle runSettersOnQuery in built-in _id setter #5351
  491. * fix(document): ensure consistent context for nested doc custom validators #5347
  492. 4.10.7 / 2017-06-18
  493. ===================
  494. * docs(validation): show overriding custom validator error with 2nd cb arg #5358
  495. * fix: `parseOption` mutates user passed option map #5357 [igwejk](https://github.com/igwejk)
  496. * docs: fix guide.jade typo #5356 [CalebAnderson2014](https://github.com/CalebAnderson2014)
  497. * fix(populate): don't set populate virtual to ids when match fails #5336
  498. * fix(query): callback with cast error if remove and delete* args have a cast error #5323
  499. 4.10.6 / 2017-06-12
  500. ===================
  501. * fix(cursor): handle custom model option for populate #5334
  502. * fix(populate): handle empty virtual populate with Model.populate #5331
  503. * fix(model): make ensureIndexes() run with autoIndex: false unless called internally #5328 #5324 #5317
  504. * fix: wait for all connections to close before resolving disconnect() promise #5316
  505. * fix(document): handle setting populated path with custom typeKey in schema #5313
  506. * fix(error): add toJSON helper to ValidationError so `message` shows up with JSON.stringify #5309
  507. * feat: add `getPromiseConstructor()` to prevent need for `mongoose.Promise.ES6` #5305
  508. * fix(document): handle conditional required with undefined props #5296
  509. * fix(model): clone options before inserting in save() #5294
  510. * docs(populate): clarify that multiple populate() calls on same path overwrite #5274
  511. 4.10.5 / 2017-06-06
  512. ===================
  513. * chore: improve contrib guide for building docs #5312
  514. * fix(populate): handle init-ing nested virtuals properly #5311
  515. * fix(update): report update validator error if required path under single nested doc not set
  516. * fix(schema): remove default validate pre hook that was causing issues with jest #4943
  517. 4.10.4 / 2017-05-29
  518. ===================
  519. * chore: dont store test data in same directory #5303
  520. * chore: add data dirs to npmignore #5301 [Starfox64](https://github.com/Starfox64)
  521. * docs(query): add docs about runSettersOnQuery #5300
  522. 4.10.3 / 2017-05-27
  523. ===================
  524. * docs: correct inconsistent references to updateOne and replaceOne #5297 [dhritzkiv](https://github.com/dhritzkiv)
  525. * docs: fix dropdowns in docs #5292 [nathanallen](https://github.com/nathanallen)
  526. * docs: add description of alias option #5287
  527. * fix(document): prevent infinite loop if validating nested array #5282
  528. * fix(schema): correctly handle ref ObjectIds from different mongoose libs #5259
  529. * fix(schema): load child class methods after base class methods to allow override #5227
  530. 4.10.2 / 2017-05-22
  531. ===================
  532. * fix: bump ms -> 2.0.0 and mquery -> 2.3.1 for minor security vulnerability #5275
  533. 4.10.1 / 2017-05-21
  534. ===================
  535. * fix(aggregate): handle sorting by text score correctly #5258
  536. * fix(populate): handle doc.populate() with virtuals #5240
  537. * fix(schema): enforce that `_id` is never null #5236
  538. 4.10.0 / 2017-05-18
  539. ===================
  540. * fix(schema): update clone method to include indexes #5268 [clozanosanchez](https://github.com/clozanosanchez)
  541. * feat(schema): support aliases #5184 [rocketspacer](https://github.com/rocketspacer)
  542. * feat(aggregate): add mongoose-specific aggregation cursor option #5145
  543. * refactor(model): make sharding into a plugin instead of core #5105
  544. * fix(document): make nested doc mongoose internals not enumerable again #5078
  545. * feat(model): pass params to pre hooks #5064
  546. * feat(timestamps): support already defined timestamp paths in schema #4868
  547. * feat(query): add runSettersOnQuery option #4569
  548. * fix(query): add strictQuery option that throws when not querying on field not in schema #4136
  549. * fix(update): more complete handling for overwrite option with update validators #3556
  550. * feat: support `unique: true` in arrays via the mongoose-unique-array plugin #3347
  551. * fix(model): always emit 'index', even if no indexes #3347
  552. * fix(schema): set unique indexes on primitive arrays #3347
  553. * feat(validation): include failed paths in error message and inspect output #3064 #2135
  554. * fix(model): return saved docs when create() fails #2190
  555. 4.9.10 / 2017-05-17
  556. ===================
  557. * fix(connection): ensure callback arg to openSet() is handled properly #5249
  558. * docs: remove dead plugins repo and add content links #5247
  559. * fix(model): skip index build if connecting after model init and autoIndex false #5176
  560. 4.9.9 / 2017-05-13
  561. ==================
  562. * docs: correct value for Query#regex() #5230
  563. * fix(connection): don't throw if .catch() on open() promise #5229
  564. * fix(schema): allow update with $currentDate for updatedAt to succeed #5222
  565. * fix(model): versioning doesn't fail if version key undefined #5221 [basileos](https://github.com/basileos)
  566. * fix(document): don't emit model error if callback specified for consistency with docs #5216
  567. * fix(document): handle errors in subdoc pre validate #5215
  568. 4.9.8 / 2017-05-07
  569. ==================
  570. * docs(subdocs): rewrite subdocs guide #5217
  571. * fix(document): avoid circular JSON if error in doc array under single nested subdoc #5208
  572. * fix(document): set intermediate empty objects for deeply nested undefined paths before path itself #5206
  573. * fix(schema): throw error if first param to schema.plugin() is not a function #5201
  574. * perf(document): major speedup in validating subdocs (50x in some cases) #5191
  575. 4.9.7 / 2017-04-30
  576. ==================
  577. * docs: fix typo #5204 [phutchins](https://github.com/phutchins)
  578. * fix(schema): ensure correct path for deeply nested schema indexes #5199
  579. * fix(schema): make remove a reserved name #5197
  580. * fix(model): handle Decimal type in insertMany correctly #5190
  581. * fix: upgrade kareem to handle async pre hooks correctly #5188
  582. * docs: add details about unique not being a validator #5179
  583. * fix(validation): handle returning a promise with isAsync: true #5171
  584. 4.9.6 / 2017-04-23
  585. ==================
  586. * fix: update `parentArray` references when directly assigning document arrays #5192 [jhob](https://github.com/jhob)
  587. * docs: improve schematype validator docs #5178 [milesbarr](https://github.com/milesbarr)
  588. * fix(model): modify discriminator() class in place #5175
  589. * fix(model): handle bulkWrite updateMany casting #5172 [tzellman](https://github.com/tzellman)
  590. * docs(model): fix replaceOne example for bulkWrite #5168
  591. * fix(document): don't create a new array subdoc when creating schema array #5162
  592. * fix(model): merge query hooks from discriminators #5147
  593. * fix(document): add parent() function to subdocument to match array subdoc #5134
  594. 4.9.5 / 2017-04-16
  595. ==================
  596. * fix(query): correct $pullAll casting of null #5164 [Sebmaster](https://github.com/Sebmaster)
  597. * docs: add advanced schemas docs for loadClass #5157
  598. * fix(document): handle null/undefined gracefully in applyGetters() #5143
  599. * fix(model): add resolveToObject option for mapReduce with ES6 promises #4945
  600. 4.9.4 / 2017-04-09
  601. ==================
  602. * fix(schema): clone query middleware correctly #5153 #5141 [clozanosanchez](https://github.com/clozanosanchez)
  603. * docs(aggregate): fix typo #5142
  604. * fix(query): cast .$ update to underlying array type #5130
  605. * fix(populate): don't mutate populate result in place #5128
  606. * fix(query): handle $setOnInsert consistent with $set #5126
  607. * docs(query): add strict mode option for findOneAndUpdate #5108
  608. 4.9.3 / 2017-04-02
  609. ==================
  610. * docs: document.js fixes for functions prepended with `$` #5131 [krmannix](https://github.com/krmannix)
  611. * fix: Avoid exception on constructor check #5129 [monkbroc](https://github.com/monkbroc)
  612. * docs(schematype): explain how to use `isAsync` with validate() #5125
  613. * docs(schematype): explain custom message with required function #5123
  614. * fix(populate): only apply refPath duplicate id optimization if not array #5114
  615. * fix(document): copy non-objects to doc when init() #5111
  616. * perf(populate): dont clone whole options every time #5103
  617. * feat(document): add isDirectSelected() to minimize isSelected() changes #5063
  618. * docs(schematypes): explain some subtleties with arrays #5059
  619. 4.9.2 / 2017-03-26
  620. ==================
  621. * fix(discriminator): handle class names consistently #5104
  622. * fix(schema): make clone() work with reusing discriminator schemas #5098
  623. * fix(querycursor): run pre find hooks with .cursor() #5096
  624. * fix(connection): throw error if username:password includes @ or : #5091
  625. * fix(timestamps): handle overwriting createdAt+updatedAt consistently #5088
  626. * fix(document): ensure subdoc post save runs after parent save #5085
  627. * docs(model): improve update docs #5076 [bertolo1988](https://github.com/bertolo1988)
  628. 4.9.1 / 2017-03-19
  629. ==================
  630. * fix(query): handle $type for arrays #5080 #5079 [zoellner](https://github.com/zoellner)
  631. * fix(model): handle ordered param for `insertMany` validation errors #5072 [sjorssnoeren](https://github.com/sjorssnoeren)
  632. * fix(populate): avoid duplicate ids in dynref queries #5054
  633. * fix(timestamps): dont set timestamps in update if user set it #5045
  634. * fix(update): dont double-call setters on arrays #5041
  635. * fix: upgrade driver -> 2.2.25 for jest fix #5033
  636. * fix(model): get promise each time save() is called rather than once #5030
  637. * fix(connection): make connect return value consistent #5006
  638. 4.9.0 / 2017-03-13
  639. ==================
  640. * feat(document): return this from `depopulate()` #5027
  641. * fix(drivers): stop emitting timeouts as errors #5026
  642. * feat(schema): add a clone() function for schemas #4983
  643. * feat(query): add rawResult option to replace passRawResult, deprecate passRawResult #4977 #4925
  644. * feat(schematype): support isAsync validator option and handle returning promises from validators, deprecate implicit async validators #4290
  645. * feat(query): add `replaceOne()`, `deleteOne()`, `deleteMany()` #3998
  646. * feat(model): add `bulkWrite()` #3998
  647. 4.8.7 / 2017-03-12
  648. ==================
  649. * fix(model): if last arg in spread is falsy, treat it as a callback #5061
  650. * fix(document): use $hook instead of hook to enable 'hook' as a path name #5047
  651. * fix(populate): dont select foreign field if parent field is selected #5037
  652. * fix(populate): handle passing no args to query.populate #5036
  653. * fix(update): use correct method for casting nested arrays #5032
  654. * fix(discriminator): handle array discriminators when casting $push #5009
  655. 4.8.6 / 2017-03-05
  656. ==================
  657. * docs(document): remove text that implies that transform is false by default #5023
  658. * fix(applyHooks): dont wrap a function if it is already wrapped #5019
  659. * fix(document): ensure nested docs' toObject() clones #5008
  660. 4.8.5 / 2017-02-25
  661. ==================
  662. * fix: check for empty schemaPath before accessing property $isMongooseDocumentArray #5017 [https://github.com/randyhoulahan](randyhoulahan)
  663. * fix(discriminators): handle create() and push() for embedded discriminators #5001
  664. * fix(querycursor): ensure close emitted after last data event #4998
  665. * fix(discriminators): remove fields not selected in child when querying by base model #4991
  666. 4.8.4 / 2017-02-19
  667. ==================
  668. * docs(discriminators): explain embedded discriminators #4997
  669. * fix(query): fix TypeError when findOneAndUpdate errors #4990
  670. * fix(update): handle nested single embedded in update validators correctly #4989
  671. * fix(browser): make browser doc constructor not crash #4987
  672. 4.8.3 / 2017-02-15
  673. ==================
  674. * chore: upgrade mongodb driver -> 2.2.24
  675. * docs(connections): addd some details about callbacks #4986
  676. * fix: ensure class is created with new keyword #4972 #4947 [benhjames](https://github.com/benhjames)
  677. * fix(discriminator): add applyPluginsToDiscriminators option #4965
  678. * fix(update): properly cast array subdocs when casting update #4960
  679. * fix(populate): ensure foreign field is selected for virtual populate #4959
  680. * docs(query): document some query callback params #4949
  681. * fix(document): ensure errors in validators get caught #2185
  682. 4.8.2 / 2017-02-10
  683. ==================
  684. * fix(update): actually run validators on addToSet #4953
  685. * fix(update): improve buffer error handling #4944 [ValYouW](https://github.com/ValYouW)
  686. * fix(discriminator): handle subclassing with loadClass correctly #4942
  687. * fix(query): allow passing Map to sort() #4941
  688. * fix(document): handle setting discriminator doc #4935
  689. * fix(schema): return correct value from pre init hook #4928
  690. * fix(query): ensure consistent params in error handlers if pre hook errors #4927
  691. 4.8.1 / 2017-01-30
  692. ==================
  693. * fix(query): handle $exists for arrays and embedded docs #4937
  694. * fix(query): handle passing string to hint() #4931
  695. 4.8.0 / 2017-01-28
  696. ==================
  697. * feat(schema): add saveErrorIfNotFound option and $where property #4924 #4004
  698. * feat(query): add $in implicitly if passed an array #4912 [QuotableWater7](https://github.com/QuotableWater7)
  699. * feat(aggregate): helper for $facet #4904 [varunjayaraman](https://github.com/varunjayaraman)
  700. * feat(query): add collation method #4839
  701. * feat(schema): propogate strict option to implicit array subschemas #4831 [dkrosso](https://github.com/dkrosso)
  702. * feat(aggregate): add helper for graphLookup #4819 [varunjayaraman](https://github.com/varunjayaraman)
  703. * feat(types): support Decimal128 #4759
  704. * feat(aggregate): add eachAsync() to aggregate cursor #4300
  705. * feat(query): add updateOne and updateMany #3997
  706. * feat(model): support options for insertMany #3893
  707. * fix(document): run validation on single nested docs if not directly modified #3884
  708. * feat(model): use discriminator constructor based on discriminatorKey in create() #3624
  709. * feat: pass collection as context to debug function #3261
  710. * feat(query): support push and addToSet for update validators #2933
  711. * perf(document): refactor registerHooksFromSchema so hooks are defined on doc prototype #2754
  712. * feat(types): add discriminator() function to doc arrays #2723 #1856
  713. * fix(populate): return an error if sorting underneath a doc array #2202
  714. 4.7.9 / 2017-01-27
  715. ==================
  716. * fix(query): handle casting $exists under $not #4933
  717. * chore: upgrade mongodb -> 2.2.22 re: #4931
  718. 4.7.8 / 2017-01-23
  719. ==================
  720. * fix(populate): better handling for virtual populate under arrays #4923
  721. * docs: upgrade contributors count #4918 [AdamZaczek](https://github.com/AdamZaczek)
  722. * fix(query): don't set nested path default if setting parent path #4911
  723. * docs(promise): add missing bracket #4907
  724. * fix(connection): ensure error handling is consistently async #4905
  725. * fix: handle authMechanism in query string #4900
  726. * fix(document): ensure error handlers run for validate #4885
  727. 4.7.7 / 2017-01-15
  728. ==================
  729. * fix(utils): don't crash if to[key] is null #4881
  730. * fix: upgrade mongodb -> 2.2.21 #4867
  731. * fix: add a toBSON to documents for easier querying #4866
  732. * fix: suppress bluebird warning #4854 [davidwu226](https://github.com/davidwu226)
  733. * fix(populate): handle nested virtuals in virtual populate #4851
  734. 4.7.6 / 2017-01-02
  735. ==================
  736. * fix(model): allow passing non-array to insertMany #4846
  737. * fix(populate): use base model name if no discriminator for backwards compat #4843
  738. * fix: allow internal validate callback to be optional #4842 [arciisine](https://github.com/arciisine)
  739. * fix(document): don't skip pointCut if save not defined (like in browser doc) #4841
  740. * chore: improve benchmarks #4838 [billouboq](https://github.com/billouboq)
  741. * perf: remove some unused parameters #4837 [billouboq](https://github.com/billouboq)
  742. * fix(query): don't call error handler if passRawResult is true and no error occurred #4836
  743. 4.7.5 / 2016-12-26
  744. ==================
  745. * docs(model): fix spelling mistake #4828 [paulinoj](https://github.com/paulinoj)
  746. * fix(aggregate): remove unhandled rejection when using aggregate.then() #4824
  747. * perf: remove try/catch that kills optimizer #4821
  748. * fix(model): handles populating with discriminators that may not have a ref #4817
  749. * fix(document): handle setting array of discriminators #3575
  750. 4.7.4 / 2016-12-21
  751. ==================
  752. * docs: fix typo #4810 [GEEKIAM](https://github.com/GEEKIAM)
  753. * fix(query): timestamps with $push + $each #4805
  754. * fix(document): handle buffers correctly in minimize #4800
  755. * fix: don't disallow overwriting default and cast fns #4795 [pdspicer](https://github.com/pdspicer)
  756. * fix(document): don't convert single nested docs to POJOs #4793
  757. * fix(connection): handle reconnect to replica set correctly #4972 [gfzabarino](https://github.com/gfzabarino)
  758. 4.7.3 / 2016-12-16
  759. ==================
  760. * fix: upgrade mongodb driver -> 2.2.16 for several bug fixes and 3.4 support #4799
  761. * fix(model): ensure discriminator key is correct for child schema on discriminator #4790
  762. * fix(document): handle mark valid in subdocs correctly #4778
  763. * fix(query): check for objects consistently #4775
  764. 4.7.2 / 2016-12-07
  765. ==================
  766. * test(populate): fix justOne test #4772 [cblanc](https://github.com/cblanc)
  767. * chore: fix benchmarks #4769 [billouboq](https://github.com/billouboq)
  768. * fix(document): handle setting subdoc to null after setting parent doc #4766
  769. * fix(query): support passRawResult with lean #4762 #4761 [mhfrantz](https://github.com/mhfrantz)
  770. * fix(query): throw StrictModeError if upsert with nonexisting field in condition #4757
  771. * test: fix a couple of sort tests #4756 [japod](https://github.com/japod)
  772. * chore: upgrade mongodb driver -> 2.2.12 #4753 [mdlavin](https://github.com/mdlavin)
  773. * fix(query): handle update with upsert and overwrite correctly #4749
  774. 4.7.1 / 2016-11-30
  775. ==================
  776. * fix(schema): throw error if you use prototype as a schema path #4746
  777. * fix(schema): throw helpful error if you define a virtual with the same path as a real path #4744
  778. * fix(connection): make createConnection not throw rejected promises #4742
  779. * fix(populate): allow specifiying options in model schema #4741
  780. * fix(document): handle selected nested elements with defaults #4739
  781. * fix(query): add model to cast error if possible #4729
  782. * fix(query): handle timestamps with overwrite #4054
  783. 4.7.0 / 2016-11-23
  784. ==================
  785. * docs: clean up schematypes #4732 [kidlj](https://github.com/kidlj)
  786. * perf: only get stack when necessary with VersionError #4726 [Sebmaster](https://github.com/Sebmaster)
  787. * fix(query): ensure correct casting when setting array element #4724
  788. * fix(connection): ensure db name gets set when you pass 4 params #4721
  789. * fix: prevent TypeError in node v7 #4719 #4706
  790. * feat(document): support .set() on virtual subpaths #4716
  791. * feat(populate): support populate virtuals on nested schemas #4715
  792. * feat(querycursor): support transform option and .map() #4714 #4705 [cblanc](https://github.com/cblanc)
  793. * fix(document): dont set defaults on not-selected nested paths #4707
  794. * fix(populate): don't throw if empty string passed to populate #4702
  795. * feat(model): add `loadClass()` function for importing schema from ES6 class #4668 [rockmacaca](https://github.com/rockmacaca)
  796. 4.6.8 / 2016-11-14
  797. ==================
  798. * fix(querycursor): clear stack when iterating onto next doc #4697
  799. * fix: handle null keys in validation error #4693 #4689 [arciisine](https://github.com/arciisine)
  800. * fix(populate): handle pre init middleware correctly with populate virtuals #4683
  801. * fix(connection): ensure consistent return value for open and openSet #4659
  802. * fix(schema): handle falsy defaults for arrays #4620
  803. 4.6.7 / 2016-11-10
  804. ==================
  805. * fix(document): only invalidate in subdoc if using update validators #4681
  806. * fix(document): don't create subdocs when excluded in projection #4669
  807. * fix(document): ensure single embedded schema validator runs with correct context #4663
  808. * fix(document): make sure to depopulate top level for sharding #4658
  809. * fix(connection): throw more helpful error when .model() called incorrectly #4652
  810. * fix(populate): throw more descriptive error when trying to populate a virtual that doesn't have proper options #4602
  811. * fix(document): ensure subtype gets set properly when saving with a buffer id #4506
  812. * fix(query): handle setDefaultsOnInsert with defaults on doc arrays #4456
  813. * fix(drivers): make debug output better by calling toBSON() #4356
  814. 4.6.6 / 2016-11-03
  815. ==================
  816. * chore: upgrade deps #4674 [TrejGun](https://github.com/TrejGun)
  817. * chore: run tests on node v7 #4673 [TrejGun](https://github.com/TrejGun)
  818. * perf: make setDefaultsOnInsert more efficient if upsert is off #4672 [CamHenlin](https://github.com/CamHenlin)
  819. * fix(populate): ensure document array is returned #4656
  820. * fix(query): cast doc arrays with positionals correctly for update #4655
  821. * fix(document): ensure single nested doc validators run with correct context #4654
  822. * fix: handle reconnect failed error in new version of driver #4653 [loris](https://github.com/loris)
  823. * fix(populate): if setting a populated doc, take its id #4632
  824. * fix(populate): handle populated virtuals in init #4618
  825. 4.6.5 / 2016-10-23
  826. ==================
  827. * docs: fix grammar issues #4642 #4640 #4639 [silvermanj7](https://github.com/silvermanj7)
  828. * fix(populate): filter out nonexistant values for dynref #4637
  829. * fix(query): handle $type as a schematype operator #4632
  830. * fix(schema): better handling for uppercase: false and lowercase: false #4622
  831. * fix(query): don't run transforms on updateForExec() #4621
  832. * fix(query): handle id = 0 in findById #4610
  833. * fix(query): handle buffers in mergeClone #4609
  834. * fix(document): handle undefined with conditional validator for validateSync #4607
  835. * fix: upgrade to mongodb driver 2.2.11 #4581
  836. * docs(schematypes): clarify schema.path() #4518
  837. * fix(query): ensure path is defined before checking in timestamps #4514
  838. * fix(model): set version key in upsert #4505
  839. * fix(document): never depopulate top-level doc #3057
  840. * refactor: ensure sync for setting non-capped collections #2690
  841. 4.6.4 / 2016-10-16
  842. ==================
  843. * fix(query): cast $not correctly #4616 #4592 [prssn](https://github.com/prssn)
  844. * fix: address issue with caching global plugins #4608 #4601 [TrejGun](https://github.com/TrejGun)
  845. * fix(model): make sure to depopulate in insertMany #4590
  846. * fix(model): buffer autoIndex if bufferCommands disabled #4589
  847. * fix(populate): copy ids array before modifying #4585
  848. * feat(schema): add retainKeyOrder prop #4542
  849. * fix(document): return isModified true for children of direct modified paths #4528
  850. * fix(connection): add dropDatabase() helper #4490
  851. * fix(model): add usePushEach option for schemas #4455
  852. * docs(connections): add some warnings about buffering #4413
  853. * fix: add ability to set promise implementation in browser #4395
  854. 4.6.3 / 2016-10-05
  855. ==================
  856. * fix(document): ensure single nested docs get initialized correctly when setting nested paths #4578
  857. * fix: turn off transforms when writing nested docs to db #4574
  858. * fix(document): don't set single nested subdocs to null when removing parent doc #4566
  859. * fix(model): ensure versionKey gets set in insertMany #4561
  860. * fix(schema): handle typeKey in arrays #4548
  861. * feat(schema): set $implicitlyCreated on schema if created by interpretAsType #4443
  862. 4.6.2 / 2016-09-30
  863. ==================
  864. * chore: upgrade to async 2.0.1 internally #4579 [billouboq](https://github.com/billouboq)
  865. * fix(types): ensure nested single doc schema errors reach update validators #4557 #4519
  866. * fix(connection): handle rs names with leading numbers (muri 1.1.1) #4556
  867. * fix(model): don't throw if method name conflicts with Object.prototype prop #4551
  868. * docs: fix broken link #4544 [VFedyk](https://github.com/VFedyk)
  869. * fix: allow overwriting model on mongoose singleton #4541 [Nainterceptor](https://github.com/Nainterceptor)
  870. * fix(document): don't use init: true when building doc defaults #4540
  871. * fix(connection): use replSet option if replset not specified #4535
  872. * fix(query): cast $not objects #4495
  873. 4.6.1 / 2016-09-20
  874. ==================
  875. * fix(query): improve handling of $not with $elemMatch #4531 #3719 [timbowhite](https://github.com/timbowhite)
  876. * fix: upgrade mongodb -> 2.2.10 #4517
  877. * chore: fix webpack build issue #4512 [saiichihashimoto](https://github.com/saiichihashimoto)
  878. * fix(query): emit error on next tick when exec callback errors #4500
  879. * test: improve test case #4496 [isayme](https://github.com/isayme)
  880. * fix(schema): use same check for array types and top-level types #4493
  881. * style: fix indentation in docs #4489 [dhurlburtusa](https://github.com/dhurlburtusa)
  882. * fix(schema): expose original object passed to constructor #4486
  883. * fix(query): handle findOneAndUpdate with array of arrays #4484 #4470 [fedotov](https://github.com/fedotov)
  884. * feat(document): add $ignore to make a path ignored #4480
  885. * fix(query): properly handle setting single embedded in update #4475 #4466 #4465
  886. * fix(updateValidators): handle single nested schema subpaths correctly #4479
  887. * fix(model): throw handy error when method name conflicts with property name #4475
  888. * fix(schema): handle .set() with array field #4472
  889. * fix(query): check nested path when avoiding double-validating Mixed #4441
  890. * fix(schema): handle calling path.trim() with no args correctly #4042
  891. 4.6.0 / 2016-09-02
  892. ==================
  893. * docs(document): clarify the findById and findByIdAndUpdate examples #4471 [mdcanham](https://github.com/mdcanham)
  894. * docs(schematypes): add details re: options #4452
  895. * docs(middleware): add docs for insertMany hooks #4451
  896. * fix(schema): create new array when copying from existing object to preserve change tracking #4449
  897. * docs: fix typo in index.jade #4448
  898. * fix(query): allow array for populate options #4446
  899. * fix(model): create should not cause unhandle reject promise #4439
  900. * 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)
  901. 4.5.10 / 2016-08-23
  902. ===================
  903. * docs: fix typo on documents.jade #4444 [Gabri3l](https://github.com/Gabri3l)
  904. * chore: upgrade mocha to 3.0.2 #4437 [TrejGun](https://github.com/TrejGun)
  905. * fix: subdocuments causing error with parent timestamp on update #4434 [dyang108](https://github.com/dyang108)
  906. * fix(query): don't crash if timestamps on and update doesn't have a path #4425 #4424 #4418
  907. * fix(query): ensure single nested subdoc is hydrated when running update validators #4420
  908. * fix(query): cast non-$geometry operators for $geoWithin #4419
  909. * docs: update contributor count #4415 [AdamZaczek](https://github.com/AdamZaczek)
  910. * docs: add more clarification re: the index event #4410
  911. * fix(document): only skip modifying subdoc path if parent is direct modified #4405
  912. * fix(schema): throw cast error if provided date invalid #4404
  913. * feat(error): use util.inspect() so CastError never prints "[object Object]" #4398
  914. * fix(model): dont error if the discriminator key is unchanged #4387
  915. * fix(query): don't throw unhandled rejection with bluebird when using cbs #4379
  916. 4.5.9 / 2016-08-14
  917. ==================
  918. * docs: add mixed schema doc for Object literal #4400 [Kikobeats](https://github.com/Kikobeats)
  919. * fix(query): cast $geoWithin and convert mongoose objects to POJOs before casting #4392
  920. * fix(schematype): dont cast defaults without parent doc #4390
  921. * fix(query): disallow passing empty string to findOne() #4378
  922. * fix(document): set single nested doc isNew correctly #4369
  923. * fix(types): checks field name correctly with nested arrays and populate #4365
  924. * fix(drivers): make debug output copy-pastable into mongodb shell #4352
  925. * fix(services): run update validators on nested paths #4332
  926. * fix(model): handle typeKey with discriminators #4339
  927. * fix(query): apply timestamps to child schemas when explicitly specified in update #4049
  928. * fix(schema): set prefix as nested path with add() #1730
  929. 4.5.8 / 2016-08-01
  930. ==================
  931. * fix(model): make changing the discriminator key cause a cast error #4374
  932. * fix(query): pass projection fields to cursor #4371 #4342 [Corei13](https://github.com/Corei13)
  933. * fix(document): support multiple paths for isModified #4370 [adambuczynski](https://github.com/adambuczynski)
  934. * fix(querycursor): always cast fields before returning cursor #4355
  935. * fix(query): support projection as alias for fields in findOneAndUpdate #4315
  936. * fix(schema): treat index false + unique false as no index #4304
  937. * fix(types): dont mark single nested subpath as modified if whole doc already modified #4224
  938. 4.5.7 / 2016-07-25
  939. ==================
  940. * fix(document): ensure no unhandled rejections if callback specified for save #4364
  941. 4.5.6 / 2016-07-23
  942. ==================
  943. * fix(schema): don't overwrite createdAt if it isn't selected #4351 [tusbar](https://github.com/tusbar)
  944. * docs(api): fix link to populate() and add a new one from depopulate() #4345 [Delapouite](https://github.com/Delapouite)
  945. * fix(types): ownerDocument() works properly with single nested docs #4344 [vichle](https://github.com/vichle)
  946. * fix(populate): dont use findOne when justOne option set #4329
  947. * fix(document): dont trigger .then() deprecated warning when calling doc.remove() #4291
  948. * docs(connection): add promiseLibrary option #4280
  949. * fix(plugins): apply global plugins to subschemas #4271
  950. * fix(model): ensure `ensureIndex()` never calls back in the same tick #4246
  951. * docs(schema): improve post hook docs on schema #4238
  952. 4.5.5 / 2016-07-18
  953. ==================
  954. * fix(document): handle setting root to empty obj if minimize false #4337
  955. * fix: downgrade to mongodb 2.1.18 #4335 #4334 #4328 #4323
  956. * perf(types): remove defineProperty usage in documentarray #4333
  957. * fix(query): correctly pass model in .toConstructor() #4318
  958. * fix(services): avoid double-validating mixed types with update validators #4305
  959. * docs(middleware): add docs describing error handling middleware #4229
  960. * fix(types): throw correct error when invalidating doc array #3602
  961. 4.5.4 / 2016-07-11
  962. ==================
  963. * fix(types): fix removing embedded documents #4309 [RoCat](https://github.com/RoCat)
  964. * docs: various docs improvements #4302 #4294 [simonxca](https://github.com/simonxca)
  965. * fix: upgrade mongodb -> 2.1.21 #4295 #4202 [RoCat](https://github.com/RoCat)
  966. * fix(populate): convert single result to array for virtual populate because of lean #4288
  967. * fix(populate): handle empty results for populate virtuals properly #4285 #4284
  968. * fix(query): dont cast $inc to number if type is long #4283
  969. * fix(types): allow setting single nested doc to null #4281
  970. * fix(populate): handle deeply nested virtual populate #4278
  971. * fix(document): allow setting empty obj if strict mode is false #4274
  972. * fix(aggregate): allow passing obj to .unwind() #4239
  973. * docs(document): add return statements to transform examples #1963
  974. 4.5.3 / 2016-06-30
  975. ==================
  976. * fix(query): pass correct options to QueryCursor #4277 #4266
  977. * fix(querycursor): handle lean option correctly #4276 [gchudnov](https://github.com/gchudnov)
  978. * fix(document): fix error handling when no error occurred #4275
  979. * fix(error): use strict mode for version error #4272
  980. * docs(populate): fix crashing compilation for populate.jade #4267
  981. * fix(populate): support `justOne` option for populate virtuals #4263
  982. * fix(populate): ensure model param gets used for populate virtuals #4261 #4243
  983. * fix(querycursor): add ability to properly close the cursor #4258
  984. * docs(model): correct link to Document #4250
  985. * docs(populate): correct path for refPath populate #4240
  986. * fix(document): support validator.isEmail as validator #4064
  987. 4.5.2 / 2016-06-24
  988. ==================
  989. * fix(connection): add checks for collection presence for `onOpen` and `onClose` #4259 [nodkz](https://github.com/nodkz)
  990. * fix(cast): allow strings for $type operator #4256
  991. * fix(querycursor): support lean() #4255 [pyramation](https://github.com/pyramation)
  992. * fix(aggregate): allow setting noCursorTimeout option #4241
  993. * fix(document): handle undefined for Array.pull #4222 [Sebmaster](https://github.com/Sebmaster)
  994. * fix(connection): ensure promise.catch() catches initial connection error #4135
  995. * fix(document): show additional context for VersionError #2633
  996. 4.5.1 / 2016-06-18
  997. ==================
  998. * fix(model): ensure wrapped insertMany() returns a promise #4237
  999. * fix(populate): dont overwrite populateVirtuals when populating multiple paths #4234
  1000. * docs(model): clarify relationship between create() and save() #4233
  1001. * fix(types): handle option param in subdoc remove() #4231 [tdebarochez](https://github.com/tdebarochez)
  1002. * fix(document): dedupe modified paths #4226 #4223 [adambuczynski](https://github.com/adambuczynski)
  1003. * fix(model): don't modify user-provided options object #4221
  1004. * fix(document): handle setting nested path to empty object #4218 #4182
  1005. * fix(document): clean subpaths when removing single nested #4216
  1006. * fix(document): don't force transform on subdocs with inspect #4213
  1007. * fix(error): allow setting .messages object #4207
  1008. 4.5.0 / 2016-06-13
  1009. ==================
  1010. * feat(query): added Query.prototype.catch() #4215 #4173 [adambuczynski](https://github.com/adambuczynski)
  1011. * feat(query): add Query.prototype.cursor() as a .stream() alternative #4117 #3637 #1907
  1012. * feat(document): add markUnmodified() function #4092 [vincentcr](https://github.com/vincentcr)
  1013. * feat(aggregate): convert aggregate object to a thenable #3995 #3946 [megagon](https://github.com/megagon)
  1014. * 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
  1015. * feat(model): add hooks for insertMany() #3846
  1016. * feat(schema): add support for custom query methods #3740 #2372
  1017. * feat(drivers): emit error on 'serverClosed' because that means that reconnect failed #3615
  1018. * feat(model): emit error event when callback throws exception #3499
  1019. * feat(model): inherit options from discriminator base schema #3414 #1818
  1020. * feat(populate): expose mongoose-populate-virtuals inspired populate API #2562
  1021. * feat(document): trigger remove hooks on subdocs when removing parent #2348
  1022. * feat(schema): add support for express-style error handling middleware #2284
  1023. * fix(model): disallow setting discriminator key #2041
  1024. * feat(schema): add support for nested arrays #1361
  1025. 4.4.20 / 2016-06-05
  1026. ===================
  1027. * docs: clarify command buffering when using driver directly #4195
  1028. * fix(promise): correct broken mpromise .catch() #4189
  1029. * fix(document): clean modified subpaths when set path to empty obj #4182
  1030. * fix(query): support minDistance with query casting and `.near()` #4179
  1031. * fix(model): remove unnecessary .save() promise #4177
  1032. * fix(schema): cast all valid ObjectId strings to object ids #3365
  1033. * docs: remove unclear "unsafe" term in query docs #3282
  1034. 4.4.19 / 2016-05-21
  1035. ===================
  1036. * fix(model): handle insertMany if timestamps not set #4171
  1037. 4.4.18 / 2016-05-21
  1038. ===================
  1039. * docs: add missing period #4170 [gitname](https://github.com/gitname)
  1040. * docs: change build badge to svg #4158 [a0viedo](https://github.com/a0viedo)
  1041. * fix(model): update timestamps when setting `createdAt` #4155
  1042. * fix(utils): make sure to require in document properly #4152
  1043. * fix(model): throw overwrite error when discriminator name conflicts #4148
  1044. 4.4.17 / 2016-05-13
  1045. ===================
  1046. * docs: remove repetition in QueryStream docs #4147 [hugoabonizio](https://github.com/hugoabonizio)
  1047. * fix(document): dont double-validate doc array elements #4145
  1048. * fix(document): call required function with correct scope #4142 [JedWatson](https://github.com/JedWatson)
  1049. 4.4.16 / 2016-05-09
  1050. ===================
  1051. * refactor(document): use function reference #4133 [dciccale](https://github.com/dciccale)
  1052. * docs(querystream): clarify `destroy()` and close event #4126 [AnthonyCC](https://github.com/AnthonyCC)
  1053. * test: make before hook fail fast if it can't connect #4121
  1054. * docs: add description of CastError constructor params #4120
  1055. * fix(schematype): ensure single embedded defaults have $parent #4115
  1056. * fix(document): mark nested paths for validation #4111
  1057. * fix(schema): make sure element is always a subdoc in doc array validation #3816
  1058. 4.4.15 / 2016-05-06
  1059. ===================
  1060. * fix(schema): support overwriting array default #4109
  1061. * fix(populate): assign values when resolving each populate #4104
  1062. * fix(aggregate): dont send async option to server #4101
  1063. * fix(model): ensure isNew set to false after insertMany #4099
  1064. * fix(connection): emit on error if listeners and no callback #4098
  1065. * fix(document): treat required fn that returns false as required: false #4094
  1066. 4.4.14 / 2016-04-27
  1067. ===================
  1068. * fix: upgrade mongodb -> 2.1.18 #4102
  1069. * feat(connection): allow setting mongos as a uri query param #4093 #4035 [burtonjc](https://github.com/burtonjc)
  1070. * fix(populate): make sure to use correct assignment order for each model #4073
  1071. * fix(schema): add complete set of geospatial operators for single embedded subdocs #4014
  1072. 3.8.40 / 2016-04-24
  1073. ===================
  1074. * upgraded; mquery -> 1.10.0 #3989
  1075. 4.4.13 / 2016-04-21
  1076. ===================
  1077. * docs: add docs favicons #4082 [robertjustjones](https://github.com/robertjustjones)
  1078. * docs(model): correct Model.remove() return value #4075 [Jokero](https://github.com/Jokero)
  1079. * fix(query): add $geoWithin query casting for single embedded docs #4044
  1080. * fix(schema): handle setting trim option to falsy #4042
  1081. * fix(query): handle setDefaultsOnInsert with empty update #3835
  1082. 4.4.12 / 2016-04-08
  1083. ===================
  1084. * docs(query): document context option for update and findOneAndUpdate #4055
  1085. * docs(query): correct link to $geoWithin docs #4050
  1086. * fix(project): upgrade to mongodb driver 2.1.16 #4048 [schmalliso](https://github.com/schmalliso)
  1087. * docs(validation): fix validation docs #4028
  1088. * fix(types): improve .id() check for document arrays #4011
  1089. * fix(query): remove premature return when using $rename #3171
  1090. * docs(connection): clarify relationship between models and connections #2157
  1091. 4.4.11 / 2016-04-03
  1092. ===================
  1093. * fix: upgrade to mongodb driver 2.1.14 #4036 #4030 #3945
  1094. * fix(connection): allow connecting with { mongos: true } to handle query params #4032 [burtonjc](https://github.com/burtonjc)
  1095. * docs(connection): add autoIndex example #4026 [tilleps](https://github.com/tilleps)
  1096. * fix(query): handle passRawResult option when zero results #4023
  1097. * fix(populate): clone options before modifying #4022
  1098. * docs: add missing whitespace #4019 [chenxsan](https://github.com/chenxsan)
  1099. * chore: upgrade to ESLint 2.4.0 #4015 [ChristianMurphy](https://github.com/ChristianMurphy)
  1100. * fix(types): single nested subdocs get ids by default #4008
  1101. * chore(project): add dependency status badge #4007 [Maheshkumar-Kakade](http://github.com/Maheshkumar-Kakade)
  1102. * fix: make sure timestamps don't trigger unnecessary updates #4005 #3991 [tommarien](https://github.com/tommarien)
  1103. * fix(document): inspect inherits schema options #4001
  1104. * fix(populate): don't mark populated path as modified if setting to object w/ same id #3992
  1105. * fix(document): support kind argument to invalidate #3965
  1106. 4.4.10 / 2016-03-24
  1107. ===================
  1108. * fix(document): copy isNew when copying a document #3982
  1109. * fix(document): don't override defaults with undefined keys #3981
  1110. * fix(populate): merge multiple deep populate options for the same path #3974
  1111. 4.4.9 / 2016-03-22
  1112. ==================
  1113. * fix: upgrade mongodb -> 2.1.10 re https://jira.mongodb.org/browse/NODE-679 #4010
  1114. * docs: add syntax highlighting for acquit examples #3975
  1115. 4.4.8 / 2016-03-18
  1116. ==================
  1117. * docs(aggregate): clarify promises #3990 [megagon](https://github.com/megagon)
  1118. * fix: upgrade mquery -> 1.10 #3988 [matskiv](https://github.com/matskiv)
  1119. * feat(connection): 'all' event for repl sets #3986 [xizhibei](https://github.com/xizhibei)
  1120. * docs(types): clarify Array.pull #3985 [seriousManual](https://github.com/seriousManual)
  1121. * feat(query): support array syntax for .sort() via mquery 1.9 #3980
  1122. * fix(populate): support > 3 level nested populate #3973
  1123. * fix: MongooseThenable exposes connection correctly #3972
  1124. * docs(connection): add note about reconnectTries and reconnectInterval #3969
  1125. * feat(document): invalidate returns the new validationError #3964
  1126. * fix(query): .eq() as shorthand for .equals #3953 [Fonger](https://github.com/Fonger)
  1127. * docs(connection): clarify connection string vs passed options #3941
  1128. * docs(query): select option for findOneAndUpdate #3933
  1129. * fix(error): ValidationError.properties no longer enumerable #3925
  1130. * docs(validation): clarify how required validators work with nested schemas #3915
  1131. * fix: upgrade mongodb driver -> 2.1.8 to make partial index errors more sane #3864
  1132. 4.4.7 / 2016-03-11
  1133. ==================
  1134. * fix(query): stop infinite recursion caused by merging a mongoose buffer #3961
  1135. * fix(populate): handle deep populate array -> array #3954
  1136. * fix(schema): allow setting timestamps with .set() #3952 #3951 #3907 [Fonger](https://github.com/Fonger)
  1137. * fix: MongooseThenable doesn't overwrite constructors #3940
  1138. * fix(schema): don't cast boolean to date #3935
  1139. * fix(drivers): support sslValidate in connection string #3929
  1140. * fix(types): correct markModified() for single nested subdocs #3910
  1141. * fix(drivers): catch and report any errors that occur in driver methods #3906
  1142. * fix(populate): get subpopulate model correctly when array under nested #3904
  1143. * fix(document): allow fields named 'pre' and 'post' #3902
  1144. * docs(query): clarify runValidators and setDefaultsOnInsert options #3892
  1145. * docs(validation): show how to use custom required messages in schema #2616
  1146. 4.4.6 / 2016-03-02
  1147. ==================
  1148. * fix: upgrade mongodb driver to 2.1.7 #3938
  1149. * docs: fix plugins link #3917 #3909 [fbertone](https://github.com/fbertone)
  1150. * fix(query): sort+select with count works #3914
  1151. * fix(query): improve mergeUpdate's ability to handle nested docs #3890
  1152. 4.4.5 / 2016-02-24
  1153. ==================
  1154. * fix(query): ability to select a length field (upgrade to mquery 1.7.0) #3903
  1155. * fix: include nested CastError as reason for array CastError #3897 [kotarou3](https://github.com/kotarou3)
  1156. * fix(schema): check for doc existence before taking fields #3889
  1157. * feat(schema): useNestedStrict option to take nested strict mode for update #3883
  1158. * docs(validation): clarify relationship between required and checkRequired #3822
  1159. * docs(populate): dynamic reference docs #3809
  1160. * docs: expand dropdown when clicking on file name #3807
  1161. * docs: plugins.mongoosejs.io is up #3127
  1162. * fix(schema): ability to add a virtual with same name as removed path #2398
  1163. 4.4.4 / 2016-02-17
  1164. ==================
  1165. * fix(schema): handle field selection when casting single nested subdocs #3880
  1166. * fix(populate): populating using base model with multiple child models in result #3878
  1167. * fix: ability to properly use return value of `mongoose.connect()` #3874
  1168. * fix(populate): dont hydrate populated subdoc if lean option set #3873
  1169. * fix(connection): dont re-auth if already connected with useDb #3871
  1170. * docs: cover how to set underlying driver's promise lib #3869
  1171. * fix(document): handle conflicting names in validation errors with subdocs #3867
  1172. * fix(populate): set undefined instead of null consistently when populate couldn't find results #3859
  1173. * docs: link to `execPopulate()` in `doc.populate()` docs #3836
  1174. * docs(plugin): link to the `mongoose.plugin()` function #3732
  1175. 4.4.3 / 2016-02-09
  1176. ==================
  1177. * fix: upgrade to mongodb 2.1.6 to remove kerberos log output #3861 #3860 [cartuchogl](https://github.com/cartuchogl)
  1178. * fix: require('mongoose') is no longer a pseudo-promise #3856
  1179. * fix(query): update casting for single nested docs #3820
  1180. * fix(populate): deep populating multiple paths with same options #3808
  1181. * docs(middleware): clarify save/validate hook order #1149
  1182. 4.4.2 / 2016-02-05
  1183. ==================
  1184. * fix(aggregate): handle calling .cursor() with no options #3855
  1185. * fix: upgrade mongodb driver to 2.1.5 for GridFS memory leak fix #3854
  1186. * docs: fix schematype.html conflict #3853 #3850 #3843
  1187. * fix(model): bluebird unhandled rejection with ensureIndexes() on init #3837
  1188. * docs: autoIndex option for createConnection #3805
  1189. 4.4.1 / 2016-02-03
  1190. ==================
  1191. * fix: linting broke some cases where we use `== null` as shorthand #3852
  1192. * docs: fix up schematype.html conflict #3848 #3843 [mynameiscoffey](https://github.com/mynameiscoffey)
  1193. * fix: backwards breaking change with `.connect()` return value #3847
  1194. * docs: downgrade dox and highlight.js to fix docs build #3845
  1195. * docs: clean up typo #3842 [Flash-](https://github.com/Flash-)
  1196. * fix(document): storeShard handles undefined values #3841
  1197. * chore: more linting #3838 [TrejGun](https://github.com/TrejGun)
  1198. * fix(schema): handle `text: true` as a way to declare a text index #3824
  1199. 4.4.0 / 2016-02-02
  1200. ==================
  1201. * docs: fix expireAfterSeconds index option name #3831 [Flash-](https://github.com/Flash-)
  1202. * chore: run lint after test #3829 [ChristianMurphy](https://github.com/ChristianMurphy)
  1203. * chore: use power-assert instead of assert #3828 [TrejGun](https://github.com/TrejGun)
  1204. * chore: stricter lint #3827 [TrejGun](https://github.com/TrejGun)
  1205. * feat(types): casting moment to date #3813 [TrejGun](https://github.com/TrejGun)
  1206. * chore: comma-last lint for test folder #3810 [ChristianMurphy](https://github.com/ChristianMurphy)
  1207. * fix: upgrade async mpath, mpromise, muri, and sliced #3801 [TrejGun](https://github.com/TrejGun)
  1208. * fix(query): geo queries now return proper ES2015 promises #3800 [TrejGun](https://github.com/TrejGun)
  1209. * perf(types): use `Object.defineProperties()` for array #3799 [TrejGun](https://github.com/TrejGun)
  1210. * fix(model): mapReduce, ensureIndexes, remove, and save properly return ES2015 promises #3795 #3628 #3595 [TrejGun](https://github.com/TrejGun)
  1211. * docs: fixed dates in History.md #3791 [Jokero](https://github.com/Jokero)
  1212. * feat: connect, open, openSet, and disconnect return ES2015 promises #3790 #3622 [TrejGun](https://github.com/TrejGun)
  1213. * feat: custom type for int32 via mongoose-int32 npm package #3652 #3102
  1214. * feat: basic custom schema type API #995
  1215. * feat(model): `insertMany()` for more performant bulk inserts #723
  1216. 4.3.7 / 2016-01-23
  1217. ==================
  1218. * docs: grammar fix in timestamps docs #3786 [zclancy](https://github.com/zclancy)
  1219. * fix(document): setting nested populated docs #3783 [slamuu](https://github.com/slamuu)
  1220. * fix(document): don't call post save hooks twice for pushed docs #3780
  1221. * fix(model): handle `_id=0` correctly #3776
  1222. * docs(middleware): async post hooks #3770
  1223. * docs: remove confusing sentence #3765 [marcusmellis89](https://github.com/marcusmellis89)
  1224. 3.8.39 / 2016-01-15
  1225. ===================
  1226. * fixed; casting a number to a buffer #3764
  1227. * fixed; enumerating virtual property with nested objects #3743 [kusold](https://github.com/kusold)
  1228. 4.3.6 / 2016-01-15
  1229. ==================
  1230. * fix(types): casting a number to a buffer #3764
  1231. * fix: add "listener" to reserved keywords #3759
  1232. * chore: upgrade uglify #3757 [ChristianMurphy](https://github.com/ChristianMurphy)
  1233. * fix: broken execPopulate() in 4.3.5 #3755 #3753
  1234. * fix: ability to remove() a single embedded doc #3754
  1235. * style: comma-last in test folder #3751 [ChristianMurphy](https://github.com/ChristianMurphy)
  1236. * docs: clarify versionKey option #3747
  1237. * fix: improve colorization for arrays #3744 [TrejGun](https://github.com/TrejGun)
  1238. * fix: webpack build #3713
  1239. 4.3.5 / 2016-01-09
  1240. ==================
  1241. * fix(query): throw when 4th parameter to update not a function #3741 [kasselTrankos](https://github.com/kasselTrankos)
  1242. * fix(document): separate error type for setting an object to a primitive #3735
  1243. * fix(populate): Model.populate returns ES6 promise #3734
  1244. * fix(drivers): re-register event handlers after manual reconnect #3729
  1245. * docs: broken links #3727
  1246. * fix(validation): update validators run array validation #3724
  1247. * docs: clarify the need to use markModified with in-place date ops #3722
  1248. * fix(document): mark correct path as populated when manually populating array #3721
  1249. * fix(aggregate): support for array pipeline argument to append #3718 [dbkup](https://github.com/dbkup)
  1250. * docs: clarify `.connect()` callback #3705
  1251. * fix(schema): properly validate nested single nested docs #3702
  1252. * fix(types): handle setting documentarray of wrong type #3701
  1253. * docs: broken links #3700
  1254. * fix(drivers): debug output properly displays '0' #3689
  1255. 3.8.38 / 2016-01-07
  1256. ===================
  1257. * fixed; aggregate.append an array #3730 [dbkup](https://github.com/dbkup)
  1258. 4.3.4 / 2015-12-23
  1259. ==================
  1260. * fix: upgrade mongodb driver to 2.1.2 for repl set error #3712 [sansmischevia](https://github.com/sansmischevia)
  1261. * docs: validation docs typo #3709 [ivanmaeder](https://github.com/ivanmaeder)
  1262. * style: remove unused variables #3708 [ChristianMurphy](https://github.com/ChristianMurphy)
  1263. * fix(schema): duck-typing for schemas #3703 [mgcrea](https://github.com/mgcrea)
  1264. * docs: connection sample code issue #3697
  1265. * fix(schema): duck-typing for schemas #3693 [mgcrea](https://github.com/mgcrea)
  1266. * docs: clarify id schema option #3638
  1267. 4.3.3 / 2015-12-18
  1268. ==================
  1269. * fix(connection): properly support 'replSet' as well as 'replset' #3688 [taxilian](https://github.com/taxilian)
  1270. * fix(document): single nested doc pre hooks called before nested doc array #3687 [aliatsis](https://github.com/aliatsis)
  1271. 4.3.2 / 2015-12-17
  1272. ==================
  1273. * fix(document): .set() into single nested schemas #3686
  1274. * fix(connection): support 'replSet' as well as 'replset' option #3685
  1275. * fix(document): bluebird unhandled rejection when validating doc arrays #3681
  1276. * fix(document): hooks for doc arrays in single nested schemas #3680
  1277. * fix(document): post hooks for single nested schemas #3679
  1278. * fix: remove unused npm module #3674 [sybarite](https://github.com/sybarite)
  1279. * fix(model): don't swallow exceptions in nested doc save callback #3671
  1280. * docs: update keepAlive info #3667 [ChrisZieba](https://github.com/ChrisZieba)
  1281. * fix(document): strict 'throw' throws a specific mongoose error #3662
  1282. * fix: flakey test #3332
  1283. * fix(query): more robust check for RegExp #2969
  1284. 4.3.1 / 2015-12-11
  1285. ==================
  1286. * feat(aggregate): `.sample()` helper #3665
  1287. * fix(query): bitwise query operators with buffers #3663
  1288. * docs(migration): clarify `new` option and findByIdAndUpdate #3661
  1289. 4.3.0 / 2015-12-09
  1290. ==================
  1291. * feat(query): support for mongodb 3.2 bitwise query operators #3660
  1292. * style: use comma-last style consistently #3657 [ChristianMurphy](https://github.com/ChristianMurphy)
  1293. * feat: upgrade mongodb driver to 2.1.0 for full MongoDB 3.2 support #3656
  1294. * feat(aggregate): `.lookup()` helper #3532
  1295. 4.2.10 / 2015-12-08
  1296. ===================
  1297. * fixed; upgraded marked #3653 [ChristianMurphy](https://github.com/ChristianMurphy)
  1298. * docs; cross-db populate #3648
  1299. * docs; update mocha URL #3646 [ojhaujjwal](https://github.com/ojhaujjwal)
  1300. * fixed; call close callback asynchronously #3645
  1301. * docs; virtuals.html issue #3644 [Psarna94](https://github.com/Psarna94)
  1302. * fixed; single embedded doc casting on init #3642
  1303. * docs; validation docs improvements #3640
  1304. 4.2.9 / 2015-12-02
  1305. ==================
  1306. * docs; defaults docs #3625
  1307. * fix; nested numeric keys causing an embedded document crash #3623
  1308. * fix; apply path getters before virtual getters #3618
  1309. * fix; casting for arrays in single nested schemas #3616
  1310. 4.2.8 / 2015-11-25
  1311. ==================
  1312. * docs; clean up README links #3612 [ReadmeCritic](https://github.com/ReadmeCritic)
  1313. * fix; ESLint improvements #3605 [ChristianMurphy](https://github.com/ChristianMurphy)
  1314. * fix; assigning single nested subdocs #3601
  1315. * docs; describe custom logging functions in `mongoose.set()` docs #3557
  1316. 4.2.7 / 2015-11-20
  1317. ==================
  1318. * fixed; readPreference connection string option #3600
  1319. * fixed; pulling from manually populated arrays #3598 #3579
  1320. * docs; FAQ about OverwriteModelError #3597 [stcruy](https://github.com/stcruy)
  1321. * fixed; setting single embedded schemas to null #3596
  1322. * fixed; indexes for single embedded schemas #3594
  1323. * docs; clarify projection for `findOne()` #3593 [gunar](https://github.com/gunar)
  1324. * fixed; .ownerDocument() method on single embedded schemas #3589
  1325. * fixed; properly throw casterror for query on single embedded schema #3580
  1326. * upgraded; mongodb driver -> 2.0.49 for reconnect issue fix #3481
  1327. 4.2.6 / 2015-11-16
  1328. ==================
  1329. * fixed; ability to manually populate an array #3575
  1330. * docs; clarify `isAsync` parameter to hooks #3573
  1331. * fixed; use captureStackTrace if possible instead #3571
  1332. * fixed; crash with buffer and update validators #3565 [johnpeb](https://github.com/johnpeb)
  1333. * fixed; update casting with operators overwrite: true #3564
  1334. * fixed; validation with single embedded docs #3562
  1335. * fixed; inline docs inherit parents $type key #3560
  1336. * docs; bad grammar in populate docs #3559 [amaurymedeiros](https://github.com/amaurymedeiros)
  1337. * fixed; properly handle populate option for find() #2321
  1338. 3.8.37 / 2015-11-16
  1339. ===================
  1340. * fixed; use retainKeyOrder for cloning update op #3572
  1341. 4.2.5 / 2015-11-09
  1342. ==================
  1343. * fixed; handle setting fields in pre update hooks with exec #3549
  1344. * upgraded; ESLint #3547 [ChristianMurphy](https://github.com/ChristianMurphy)
  1345. * fixed; bluebird unhandled rejections with cast errors and .exec #3543
  1346. * fixed; min/max validators handling undefined #3539
  1347. * fixed; standalone mongos connections #3537
  1348. * fixed; call `.toObject()` when setting a single nested doc #3535
  1349. * fixed; single nested docs now have methods #3534
  1350. * fixed; single nested docs with .create() #3533 #3521 [tusbar](https://github.com/tusbar)
  1351. * docs; deep populate docs #3528
  1352. * fixed; deep populate schema ref handling #3507
  1353. * upgraded; mongodb driver -> 2.0.48 for sort overflow issue #3493
  1354. * docs; clarify default ids for discriminators #3482
  1355. * fixed; properly support .update(doc) #3221
  1356. 4.2.4 / 2015-11-02
  1357. ==================
  1358. * fixed; upgraded `ms` package for security vulnerability #3524 [fhemberger](https://github.com/fhemberger)
  1359. * fixed; ESlint rules #3517 [ChristianMurphy](https://github.com/ChristianMurphy)
  1360. * docs; typo in aggregation docs #3513 [rafakato](https://github.com/rafakato)
  1361. * fixed; add `dontThrowCastError` option to .update() for promises #3512
  1362. * fixed; don't double-cast buffers in node 4.x #3510 #3496
  1363. * fixed; population with single embedded schemas #3501
  1364. * fixed; pre('set') hooks work properly #3479
  1365. * docs; promises guide #3441
  1366. 4.2.3 / 2015-10-26
  1367. ==================
  1368. * docs; remove unreferenced function in middleware.jade #3506
  1369. * fixed; handling auth with no username/password #3500 #3498 #3484 [mleanos](https://github.com/mleanos)
  1370. * fixed; more ESlint rules #3491 [ChristianMurphy](https://github.com/ChristianMurphy)
  1371. * fixed; swallowing exceptions in save callback #3478
  1372. * docs; fixed broken links in subdocs guide #3477
  1373. * fixed; casting booleans to numbers #3475
  1374. * fixed; report CastError for subdoc arrays in findOneAndUpdate #3468
  1375. * fixed; geoNear returns ES6 promise #3458
  1376. 4.2.2 / 2015-10-22
  1377. ==================
  1378. * fixed; go back to old pluralization code #3490
  1379. 4.2.1 / 2015-10-22
  1380. ==================
  1381. * fixed; pluralization issues #3492 [ChristianMurphy](https://github.com/ChristianMurphy)
  1382. 4.2.0 / 2015-10-22
  1383. ==================
  1384. * added; support for skipVersioning for document arrays #3467 [chazmo03](https://github.com/chazmo03)
  1385. * added; ability to customize schema 'type' key #3459 #3245
  1386. * fixed; writeConcern for index builds #3455
  1387. * added; emit event when individual index build starts #3440 [objectiveSee](https://github.com/objectiveSee)
  1388. * added; 'context' option for update validators #3430
  1389. * refactor; pluralization now in separate pluralize-mongoose npm module #3415 [ChristianMurphy](https://github.com/ChristianMurphy)
  1390. * added; customizable error validation messages #3406 [geronime](https://github.com/geronime)
  1391. * added; support for passing 'minimize' option to update #3381
  1392. * added; ability to customize debug logging format #3261
  1393. * added; baseModelName property for discriminator models #3202
  1394. * added; 'emitIndexErrors' option #3174
  1395. * added; 'async' option for aggregation cursor to support buffering #3160
  1396. * added; ability to skip validation for individual save() calls #2981
  1397. * added; single embedded schema support #2689 #585
  1398. * added; depopulate function #2509
  1399. 4.1.12 / 2015-10-19
  1400. ===================
  1401. * docs; use readPreference instead of slaveOk for Query.setOptions docs #3471 [buunguyen](https://github.com/buunguyen)
  1402. * fixed; more helpful error when regexp contains null bytes #3456
  1403. * fixed; x509 auth issue #3454 [NoxHarmonium](https://github.com/NoxHarmonium)
  1404. 3.8.36 / 2015-10-18
  1405. ===================
  1406. * fixed; Make array props non-enumerable #3461 [boblauer](https://github.com/boblauer)
  1407. 4.1.11 / 2015-10-12
  1408. ===================
  1409. * fixed; update timestamps for update() if they're enabled #3450 [isayme](https://github.com/isayme)
  1410. * fixed; unit test error on node 0.10 #3449 [isayme](https://github.com/isayme)
  1411. * docs; timestamp option docs #3448 [isayme](https://github.com/isayme)
  1412. * docs; fix unexpected indent #3443 [isayme](https://github.com/isayme)
  1413. * fixed; use ES6 promises for Model.prototype.remove() #3442
  1414. * fixed; don't use unused 'safe' option for index builds #3439
  1415. * fixed; elemMatch casting bug #3437 #3435 [DefinitelyCarter](https://github.com/DefinitelyCarter)
  1416. * docs; schema.index docs #3434
  1417. * fixed; exceptions in save() callback getting swallowed on mongodb 2.4 #3371
  1418. 4.1.10 / 2015-10-05
  1419. ===================
  1420. * docs; improve virtuals docs to explain virtuals schema option #3433 [zoyaH](https://github.com/zoyaH)
  1421. * docs; MongoDB server version compatibility guide #3427
  1422. * docs; clarify that findById and findByIdAndUpdate fire hooks #3422
  1423. * docs; clean up Model.save() docs #3420
  1424. * fixed; properly handle projection with just id #3407 #3412
  1425. * fixed; infinite loop when database document is corrupted #3405
  1426. * docs; clarify remove middleware #3388
  1427. 4.1.9 / 2015-09-28
  1428. ==================
  1429. * docs; minlength and maxlength string validation docs #3368 #3413 [cosmosgenius](https://github.com/cosmosgenius)
  1430. * fixed; linting for infix operators #3397 [ChristianMurphy](https://github.com/ChristianMurphy)
  1431. * fixed; proper casting for $all #3394
  1432. * fixed; unhandled rejection warnings with .create() #3391
  1433. * docs; clarify update validators on paths that aren't explicitly set #3386
  1434. * docs; custom validator examples #2778
  1435. 4.1.8 / 2015-09-21
  1436. ==================
  1437. * docs; fixed typo in example #3390 [kmctown](https://github.com/kmctown)
  1438. * fixed; error in toObject() #3387 [guumaster](https://github.com/guumaster)
  1439. * fixed; handling for casting null dates #3383 [alexmingoia](https://github.com/alexmingoia)
  1440. * fixed; passing composite ids to `findByIdAndUpdate` #3380
  1441. * fixed; linting #3376 #3375 [ChristianMurphy](https://github.com/ChristianMurphy)
  1442. * fixed; added NodeJS v4 to Travis #3374 [ChristianMurphy](https://github.com/ChristianMurphy)
  1443. * fixed; casting $elemMatch inside of $not #3373 [gaguirre](https://github.com/gaguirre)
  1444. * fixed; handle case where $slice is 0 #3369
  1445. * fixed; avoid running getters if path is populated #3357
  1446. * fixed; cast documents to objects when setting to a nested path #3346
  1447. 4.1.7 / 2015-09-14
  1448. ==================
  1449. * docs; typos in SchemaType documentation #3367 [jasson15](https://github.com/jasson15)
  1450. * fixed; MONGOOSE_DRIVER_PATH env variable again #3360
  1451. * docs; added validateSync docs #3353
  1452. * fixed; set findOne op synchronously in query #3344
  1453. * fixed; handling for `.pull()` on a documentarray without an id #3341
  1454. * fixed; use natural order for cloning update conditions #3338
  1455. * fixed; issue with strict mode casting for mixed type updates #3337
  1456. 4.1.6 / 2015-09-08
  1457. ==================
  1458. * fixed; MONGOOSE_DRIVER_PATH env variable #3345 [g13013](https://github.com/g13013)
  1459. * docs; global autoIndex option #3335 [albertorestifo](https://github.com/albertorestifo)
  1460. * docs; model documentation typos #3330
  1461. * fixed; report reason for CastError #3320
  1462. * fixed; .populate() no longer returns true after re-assigning #3308
  1463. * fixed; discriminators with aggregation geoNear #3304
  1464. * docs; discriminator docs #2743
  1465. 4.1.5 / 2015-09-01
  1466. ==================
  1467. * fixed; document.remove() removing all docs #3326 #3325
  1468. * fixed; connect() checks for rs_name in options #3299
  1469. * docs; examples for schema.set() #3288
  1470. * fixed; checkKeys issue with bluebird #3286 [gregthegeek](https://github.com/gregthegeek)
  1471. 4.1.4 / 2015-08-31
  1472. ==================
  1473. * fixed; ability to set strict: false for update #3305
  1474. * fixed; .create() properly uses ES6 promises #3297
  1475. * fixed; pre hooks on nested subdocs #3291 #3284 [aliatsis](https://github.com/aliatsis)
  1476. * docs; remove unclear text in .remove() docs #3282
  1477. * fixed; pre hooks called twice for 3rd-level nested doc #3281
  1478. * fixed; nested transforms #3279
  1479. * upgraded; mquery -> 1.6.3 #3278 #3272
  1480. * fixed; don't swallow callback errors by default #3273 #3222
  1481. * fixed; properly get nested paths from nested schemas #3265
  1482. * fixed; remove() with id undefined deleting all docs #3260 [thanpolas](https://github.com/thanpolas)
  1483. * fixed; handling for non-numeric projections #3256
  1484. * fixed; findById with id undefined returning first doc #3255
  1485. * fixed; use retainKeyOrder for update #3215
  1486. * added; passRawResult option to findOneAndUpdate for backwards compat #3173
  1487. 4.1.3 / 2015-08-16
  1488. ==================
  1489. * fixed; getUpdate() in pre update hooks #3520 [gregthegeek](https://github.com/gregthegeek)
  1490. * fixed; handleArray() ensures arg is an array #3238 [jloveridge](https://github.com/jloveridge)
  1491. * fixed; refresh required path cache when recreating docs #3199
  1492. * fixed; $ operator on unwind aggregation helper #3197
  1493. * fixed; findOneAndUpdate() properly returns raw result as third arg to callback #3173
  1494. * fixed; querystream with dynamic refs #3108
  1495. 3.8.35 / 2015-08-14
  1496. ===================
  1497. * fixed; handling for minimize on nested objects #2930
  1498. * fixed; don't crash when schema.path.options undefined #1824
  1499. 4.1.2 / 2015-08-10
  1500. ==================
  1501. * fixed; better handling for Jade templates #3241 [kbadk](https://github.com/kbadk)
  1502. * added; ESlint trailing spaces #3234 [ChristianMurphy](https://github.com/ChristianMurphy)
  1503. * added; ESlint #3191 [ChristianMurphy](https://github.com/ChristianMurphy)
  1504. * fixed; properly emit event on disconnect #3183
  1505. * fixed; copy options properly using Query.toConstructor() #3176
  1506. * fixed; setMaxListeners() issue in browser build #3170
  1507. * fixed; node driver -> 2.0.40 to not store undefined keys as null #3169
  1508. * fixed; update validators handle positional operator #3167
  1509. * fixed; handle $all + $elemMatch query casting #3163
  1510. * fixed; post save hooks don't swallow extra args #3155
  1511. * docs; spelling mistake in index.jade #3154
  1512. * fixed; don't crash when toObject() has no fields #3130
  1513. * fixed; apply toObject() recursively for find and update queries #3086 [naoina](https://github.com/naoina)
  1514. 4.1.1 / 2015-08-03
  1515. ==================
  1516. * fixed; aggregate exec() crash with no callback #3212 #3198 [jpgarcia](https://github.com/jpgarcia)
  1517. * fixed; pre init hooks now properly synchronous #3207 [burtonjc](https://github.com/burtonjc)
  1518. * fixed; updateValidators doesn't flatten dates #3206 #3194 [victorkohl](https://github.com/victorkohl)
  1519. * fixed; default fields don't make document dirty between saves #3205 [burtonjc](https://github.com/burtonjc)
  1520. * fixed; save passes 0 as numAffected rather than undefined when no change #3195 [burtonjc](https://github.com/burtonjc)
  1521. * fixed; better handling for positional operator in update #3185
  1522. * fixed; use Travis containers #3181 [ChristianMurphy](https://github.com/ChristianMurphy)
  1523. * fixed; leaked variable #3180 [ChristianMurphy](https://github.com/ChristianMurphy)
  1524. 4.1.0 / 2015-07-24
  1525. ==================
  1526. * added; `schema.queue()` now public #3193
  1527. * added; raw result as third parameter to findOneAndX callback #3173
  1528. * added; ability to run validateSync() on only certain fields #3153
  1529. * added; subPopulate #3103 [timbur](https://github.com/timbur)
  1530. * added; $isDefault function on documents #3077
  1531. * added; additional properties for built-in validator messages #3063 [KLicheR](https://github.com/KLicheR)
  1532. * added; getQuery() and getUpdate() functions for Query #3013
  1533. * added; export DocumentProvider #2996
  1534. * added; ability to remove path from schema #2993 [JohnnyEstilles](https://github.com/JohnnyEstilles)
  1535. * added; .explain() helper for aggregate #2714
  1536. * added; ability to specify which ES6-compatible promises library mongoose uses #2688
  1537. * added; export Aggregate #1910
  1538. 4.0.8 / 2015-07-20
  1539. ==================
  1540. * fixed; assignment with document arrays #3178 [rosston](https://github.com/rosston)
  1541. * docs; remove duplicate paragraph #3164 [rhmeeuwisse](https://github.com/rhmeeuwisse)
  1542. * docs; improve findOneAndXYZ parameter descriptions #3159 [rhmeeuwisse](https://github.com/rhmeeuwisse)
  1543. * docs; add findOneAndRemove to list of supported middleware #3158
  1544. * docs; clarify ensureIndex #3156
  1545. * fixed; refuse to save/remove document without id #3118
  1546. * fixed; hooks next() no longer accidentally returns promise #3104
  1547. * fixed; strict mode for findOneAndUpdate #2947
  1548. * added; .min.js.gz file for browser component #2806
  1549. 3.8.34 / 2015-07-20
  1550. ===================
  1551. * fixed; allow using $rename #3171
  1552. * fixed; no longer modifies update arguments #3008
  1553. 4.0.7 / 2015-07-11
  1554. ==================
  1555. * fixed; documentarray id method when using object id #3157 [siboulet](https://github.com/siboulet)
  1556. * docs; improve findById docs #3147
  1557. * fixed; update validators handle null properly #3136 [odeke-em](https://github.com/odeke-em)
  1558. * docs; jsdoc syntax errors #3128 [rhmeeuwisse](https://github.com/rhmeeuwisse)
  1559. * docs; fix typo #3126 [rhmeeuwisse](https://github.com/rhmeeuwisse)
  1560. * docs; proper formatting in queries.jade #3121 [rhmeeuwisse](https://github.com/rhmeeuwisse)
  1561. * docs; correct example for string maxlength validator #3111 [rhmeeuwisse](https://github.com/rhmeeuwisse)
  1562. * fixed; setDefaultsOnInsert with arrays #3107
  1563. * docs; LearnBoost -> Automattic in package.json #3099
  1564. * docs; pre update hook example #3094 [danpe](https://github.com/danpe)
  1565. * docs; clarify query middleware example #3051
  1566. * fixed; ValidationErrors in strict mode #3046
  1567. * fixed; set findOneAndUpdate properties before hooks run #3024
  1568. 3.8.33 / 2015-07-10
  1569. ===================
  1570. * upgraded; node driver -> 1.4.38
  1571. * fixed; dont crash when `match` validator undefined
  1572. 4.0.6 / 2015-06-21
  1573. ==================
  1574. * upgraded; node driver -> 2.0.34 #3087
  1575. * fixed; apply setters on addToSet, etc #3067 [victorkohl](https://github.com/victorkohl)
  1576. * fixed; missing semicolons #3065 [sokolikp](https://github.com/sokolikp)
  1577. * fixed; proper handling for async doc hooks #3062 [gregthegeek](https://github.com/gregthegeek)
  1578. * fixed; dont set failed populate field to null if other docs are successfully populated #3055 [eloytoro](https://github.com/eloytoro)
  1579. * fixed; setDefaultsOnInsert with document arrays #3034 [taxilian](https://github.com/taxilian)
  1580. * fixed; setters fired on array items #3032
  1581. * fixed; stop validateSync() on first error #3025 [victorkohl](https://github.com/victorkohl)
  1582. * docs; improve query docs #3016
  1583. * fixed; always exclude _id when its deselected #3010
  1584. * fixed; enum validator kind property #3009
  1585. * fixed; mquery collection names #3005
  1586. * docs; clarify mongos option #3000
  1587. * docs; clarify that query builder has a .then() #2995
  1588. * fixed; race condition in dynamic ref #2992
  1589. 3.8.31 / 2015-06-20
  1590. ===================
  1591. * fixed; properly handle text search with discriminators and $meta #2166
  1592. 4.0.5 / 2015-06-05
  1593. ==================
  1594. * fixed; ObjectIds and buffers when mongodb driver is a sibling dependency #3050 #3048 #3040 #3031 #3020 #2988 #2951
  1595. * fixed; warn user when 'increment' is used in schema #3039
  1596. * fixed; setDefaultsOnInsert with array in schema #3035
  1597. * fixed; dont use default Object toString to cast to string #3030
  1598. * added; npm badge #3020 [odeke-em](https://github.com/odeke-em)
  1599. * fixed; proper handling for calling .set() with a subdoc #2782
  1600. * fixed; dont throw cast error when using $rename on non-string path #1845
  1601. 3.8.30 / 2015-06-05
  1602. ===================
  1603. * fixed; enable users to set all options with tailable() #2883
  1604. 4.0.4 / 2015-05-28
  1605. ==================
  1606. * docs; findAndModify new parameter correct default value #3012 [JonForest](https://github.com/JonForest)
  1607. * docs; clarify pluralization rules #2999 [anonmily](https://github.com/anonmily)
  1608. * fix; discriminators with schema methods #2978
  1609. * fix; make `isModified` a schema reserved keyword #2975
  1610. * fix; properly fire setters when initializing path with object #2943
  1611. * fix; can use `setDefaultsOnInsert` without specifying `runValidators` #2938
  1612. * fix; always set validation errors `kind` property #2885
  1613. * upgraded; node driver -> 2.0.33 #2865
  1614. 3.8.29 / 2015-05-27
  1615. ===================
  1616. * fixed; Handle JSON.stringify properly for nested docs #2990
  1617. 4.0.3 / 2015-05-13
  1618. ==================
  1619. * upgraded; mquery -> 1.5.1 #2983
  1620. * docs; clarify context for query middleware #2974
  1621. * docs; fix missing type -> kind rename in History.md #2961
  1622. * fixed; broken ReadPreference include on Heroku #2957
  1623. * docs; correct form for cursor aggregate option #2955
  1624. * fixed; sync post hooks now properly called after function #2949 #2925
  1625. * fixed; fix sub-doc validate() function #2929
  1626. * upgraded; node driver -> 2.0.30 #2926
  1627. * docs; retainKeyOrder for save() #2924
  1628. * docs; fix broken class names #2913
  1629. * fixed; error when using node-clone on a doc #2909
  1630. * fixed; no more hard references to bson #2908 #2906
  1631. * fixed; dont overwrite array values #2907 [naoina](https://github.com/naoina)
  1632. * fixed; use readPreference=primary for findOneAndUpdate #2899 #2823
  1633. * docs; clarify that update validators only run on $set and $unset #2889
  1634. * fixed; set kind consistently for built-in validators #2885
  1635. * docs; single field populated documents #2884
  1636. * fixed; nested objects are now enumerable #2880 [toblerpwn](https://github.com/toblerpwn)
  1637. * fixed; properly populate field when ref, lean, stream used together #2841
  1638. * docs; fixed migration guide jade error #2807
  1639. 3.8.28 / 2015-05-12
  1640. ===================
  1641. * fixed; proper handling for toJSON options #2910
  1642. * fixed; dont attach virtuals to embedded docs in update() #2046
  1643. 4.0.2 / 2015-04-23
  1644. ==================
  1645. * fixed; error thrown when calling .validate() on subdoc not in an array #2902
  1646. * fixed; rename define() to play nice with webpack #2900 [jspears](https://github.com/jspears)
  1647. * fixed; pre validate called twice with discriminators #2892
  1648. * fixed; .inspect() on mongoose.Types #2875
  1649. * docs; correct callback params for Model.update #2872
  1650. * fixed; setDefaultsOnInsert now works when runValidators not specified #2870
  1651. * fixed; Document now wraps EventEmitter.addListener #2867
  1652. * fixed; call non-hook functions in schema queue #2856
  1653. * fixed; statics can be mocked out for tests #2848 [ninelb](https://github.com/ninelb)
  1654. * upgraded; mquery 1.4.0 for bluebird bug fix #2846
  1655. * fixed; required validators run first #2843
  1656. * docs; improved docs for new option to findAndMody #2838
  1657. * docs; populate example now uses correct field #2837 [swilliams](https://github.com/swilliams)
  1658. * fixed; pre validate changes causing VersionError #2835
  1659. * fixed; get path from correct place when setting CastError #2832
  1660. * docs; improve docs for Model.update() function signature #2827 [irnc](https://github.com/irnc)
  1661. * fixed; populating discriminators #2825 [chetverikov](https://github.com/chetverikov)
  1662. * fixed; discriminators with nested schemas #2821
  1663. * fixed; CastErrors with embedded docs #2819
  1664. * fixed; post save hook context #2816
  1665. * docs; 3.8.x -> 4.x migration guide #2807
  1666. * fixed; proper _distinct copying for query #2765 [cdelauder](https://github.com/cdelauder)
  1667. 3.8.27 / 2015-04-22
  1668. ===================
  1669. * fixed; dont duplicate db calls on Q.ninvoke() #2864
  1670. * fixed; Model.find arguments naming in docs #2828
  1671. * fixed; Support ipv6 in connection strings #2298
  1672. 3.8.26 / 2015-04-07
  1673. ===================
  1674. * fixed; TypeError when setting date to undefined #2833
  1675. * fixed; handle CastError properly in distinct() with no callback #2786
  1676. * fixed; broken links in queries docs #2779
  1677. * fixed; dont mark buffer as modified when setting type initially #2738
  1678. * fixed; dont crash when using slice with populate #1934
  1679. 4.0.1 / 2015-03-28
  1680. ==================
  1681. * fixed; properly handle empty cast doc in update() with promises #2796
  1682. * fixed; unstable warning #2794
  1683. * fixed; findAndModify docs now show new option is false by default #2793
  1684. 4.0.0 / 2015-03-25
  1685. ==================
  1686. * fixed; on-the-fly schema docs typo #2783 [artiifix](https://github.com/artiifix)
  1687. * fixed; cast error validation handling #2775 #2766 #2678
  1688. * fixed; discriminators with populate() #2773 #2719 [chetverikov](https://github.com/chetverikov)
  1689. * fixed; increment now a reserved path #2709
  1690. * fixed; avoid sending duplicate object ids in populate() #2683
  1691. * upgraded; mongodb to 2.0.24 to properly emit reconnect event multiple times #2656
  1692. 4.0.0-rc4 / 2015-03-14
  1693. ======================
  1694. * fixed; toObject virtuals schema option handled properly #2751
  1695. * fixed; update validators work on document arrays #2733
  1696. * fixed; check for cast errors on $set #2729
  1697. * fixed; instance field set for all schema types #2727 [csdco](https://github.com/csdco)
  1698. * fixed; dont run other validators if required fails #2725
  1699. * fixed; custom getters execute on ref paths #2610
  1700. * fixed; save defaults if they were set when doc was loaded from db #2558
  1701. * fixed; pre validate now runs before pre save #2462
  1702. * fixed; no longer throws errors with --use_strict #2281
  1703. 3.8.25 / 2015-03-13
  1704. ===================
  1705. * fixed; debug output reverses order of aggregation keys #2759
  1706. * fixed; $eq is a valid query selector in 3.0 #2752
  1707. * fixed; upgraded node driver to 1.4.32 for handling non-numeric poolSize #2682
  1708. * fixed; update() with overwrite sets _id for nested docs #2658
  1709. * fixed; casting for operators in $elemMatch #2199
  1710. 4.0.0-rc3 / 2015-02-28
  1711. ======================
  1712. * fixed; update() pre hooks run before validators #2706
  1713. * fixed; setters not called on arrays of refs #2698 [brandom](https://github.com/brandom)
  1714. * fixed; use node driver 2.0.18 for nodejs 0.12 support #2685
  1715. * fixed; comments reference file that no longer exists #2681
  1716. * fixed; populated() returns _id of manually populated doc #2678
  1717. * added; ability to exclude version key in toObject() #2675
  1718. * fixed; dont allow setting nested path to a string #2592
  1719. * fixed; can cast objects with _id field to ObjectIds #2581
  1720. * fixed; on-the-fly schema getters #2360
  1721. * added; strict option for findOneAndUpdate() #1967
  1722. 3.8.24 / 2015-02-25
  1723. ===================
  1724. * fixed; properly apply child schema transforms #2691
  1725. * fixed; make copy of findOneAndUpdate options before modifying #2687
  1726. * fixed; apply defaults when parent path is selected #2670 #2629
  1727. * fixed; properly get ref property for nested paths #2665
  1728. * fixed; node driver makes copy of authenticate options before modifying them #2619
  1729. * fixed; dont block process exit when auth fails #2599
  1730. * fixed; remove redundant clone in update() #2537
  1731. 4.0.0-rc2 / 2015-02-10
  1732. ======================
  1733. * added; io.js to travis build
  1734. * removed; browser build dependencies not installed by default
  1735. * added; dynamic refpaths #2640 [chetverikov](https://github.com/chetverikov)
  1736. * fixed; dont call child schema transforms on parent #2639 [chetverikov](https://github.com/chetverikov)
  1737. * fixed; get rid of remove option if new is set in findAndModify #2598
  1738. * fixed; aggregate all document array validation errors #2589
  1739. * fixed; custom setters called when setting value to undefined #1892
  1740. 3.8.23 / 2015-02-06
  1741. ===================
  1742. * fixed; unset opts.remove when upsert is true #2519
  1743. * fixed; array saved as object when path is object in array #2442
  1744. * fixed; inline transforms #2440
  1745. * fixed; check for callback in count() #2204
  1746. * fixed; documentation for selecting fields #1534
  1747. 4.0.0-rc1 / 2015-02-01
  1748. ======================
  1749. * fixed; use driver 2.0.14
  1750. * changed; use transform: true by default #2245
  1751. 4.0.0-rc0 / 2015-01-31
  1752. ===================
  1753. * fixed; wrong order for distinct() params #2628
  1754. * fixed; handling no query argument to remove() #2627
  1755. * fixed; createModel and discriminators #2623 [ashaffer](https://github.com/ashaffer)
  1756. * added; pre('count') middleware #2621
  1757. * fixed; double validation calls on document arrays #2618
  1758. * added; validate() catches cast errors #2611
  1759. * fixed; respect replicaSet parameter in connection string #2609
  1760. * added; can explicitly exclude paths from versioning #2576 [csabapalfi](https://github.com/csabapalfi)
  1761. * upgraded; driver to 2.0.15 #2552
  1762. * fixed; save() handles errors more gracefully in ES6 #2371
  1763. * fixed; undefined is now a valid argument to findOneAndUpdate #2272
  1764. * changed; `new` option to findAndModify ops is false by default #2262
  1765. 3.8.22 / 2015-01-24
  1766. ===================
  1767. * upgraded; node-mongodb-native to 1.4.28 #2587 [Climax777](https://github.com/Climax777)
  1768. * added; additional documentation for validators #2449
  1769. * fixed; stack overflow when creating massive arrays #2423
  1770. * fixed; undefined is a valid id for queries #2411
  1771. * fixed; properly create nested schema index when same schema used twice #2322
  1772. * added; link to plugin generator in docs #2085 [huei90](https://github.com/huei90)
  1773. * fixed; optional arguments documentation for findOne() #1971 [nachinius](https://github.com/nachinius)
  1774. 3.9.7 / 2014-12-19
  1775. ===================
  1776. * added; proper cursors for aggregate #2539 [changyy](https://github.com/changyy)
  1777. * added; min/max built-in validators for dates #2531 [bshamblen](https://github.com/bshamblen)
  1778. * fixed; save and validate are now reserved keywords #2380
  1779. * added; basic documentation for browser component #2256
  1780. * added; find and findOne hooks (query middleware) #2138
  1781. * fixed; throw a DivergentArrayError when saving positional operator queries #2031
  1782. * added; ability to use options as a document property #1416
  1783. * fixed; document no longer inherits from event emitter and so domain and _events are no longer reserved #1351
  1784. * removed; setProfiling #1349
  1785. 3.8.21 / 2014-12-18
  1786. ===================
  1787. * fixed; syntax in index.jade #2517 [elderbas](https://github.com/elderbas)
  1788. * fixed; writable statics #2510 #2528
  1789. * fixed; overwrite and explicit $set casting #2515
  1790. 3.9.6 / 2014-12-05
  1791. ===================
  1792. * added; correctly run validators on each element of array when entire array is modified #661 #1227
  1793. * added; castErrors in validation #1013 [jondavidjohn](https://github.com/jondavidjohn)
  1794. * added; specify text indexes in schema fields #1401 [sr527](https://github.com/sr527)
  1795. * added; ability to set field with validators to undefined #1594 [alabid](https://github.com/alabid)
  1796. * added; .create() returns an array when passed an array #1746 [alabid](https://github.com/alabid)
  1797. * added; test suite and docs for use with co and yield #2177 #2474
  1798. * fixed; subdocument toObject() transforms #2447 [chmanie](https://github.com/chmanie)
  1799. * fixed; Model.create() with save errors #2484
  1800. * added; pass options to .save() and .remove() #2494 [jondavidjohn](https://github.com/jondavidjohn)
  1801. 3.8.20 / 2014-12-01
  1802. ===================
  1803. * fixed; recursive readPref #2490 [kjvalencik](https://github.com/kjvalencik)
  1804. * fixed; make sure to copy parameters to update() before modifying #2406 [alabid](https://github.com/alabid)
  1805. * fixed; unclear documentation about query callbacks #2319
  1806. * fixed; setting a schema-less field to an empty object #2314 [alabid](https://github.com/alabid)
  1807. * fixed; registering statics and methods for discriminators #2167 [alabid](https://github.com/alabid)
  1808. 3.9.5 / 2014-11-10
  1809. ===================
  1810. * added; ability to disable autoIndex on a per-connection basis #1875 [sr527](https://github.com/sr527)
  1811. * fixed; `geoNear()` no longer enforces legacy coordinate pairs - supports GeoJSON #1987 [alabid](https://github.com/alabid)
  1812. * fixed; browser component works when minified with mangled variable names #2302
  1813. * fixed; `doc.errors` now cleared before `validate()` called #2302
  1814. * added; `execPopulate()` function to make `doc.populate()` compatible with promises #2317
  1815. * fixed; `count()` no longer throws an error when used with `sort()` #2374
  1816. * fixed; `save()` no longer recursively calls `save()` on populated fields #2418
  1817. 3.8.19 / 2014-11-09
  1818. ===================
  1819. * fixed; make sure to not override subdoc _ids on find #2276 [alabid](https://github.com/alabid)
  1820. * fixed; exception when comparing two documents when one lacks _id #2333 [slawo](https://github.com/slawo)
  1821. * fixed; getters for properties with non-strict schemas #2439 [alabid](https://github.com/alabid)
  1822. * fixed; inconsistent URI format in docs #2414 [sr527](https://github.com/sr527)
  1823. 3.9.4 / 2014-10-25
  1824. ==================
  1825. * fixed; statics no longer can be overwritten #2343 [nkcmr](https://github.com/chetverikov)
  1826. * added; ability to set single populated paths to documents #1530
  1827. * added; setDefaultsOnInsert and runValidator options for findOneAndUpdate() #860
  1828. 3.8.18 / 2014-10-22
  1829. ==================
  1830. * fixed; Dont use all toObject options in save #2340 [chetverikov](https://github.com/chetverikov)
  1831. 3.9.3 / 2014-10-01
  1832. =================
  1833. * added; support for virtuals that return objects #2294
  1834. * added; ability to manually hydrate POJOs into mongoose objects #2292
  1835. * added; setDefaultsOnInsert and runValidator options for update() #860
  1836. 3.8.17 / 2014-09-29
  1837. ==================
  1838. * fixed; use schema options retainKeyOrder in save() #2274
  1839. * fixed; fix skip in populate when limit is set #2252
  1840. * fixed; fix stack overflow when passing MongooseArray to findAndModify #2214
  1841. * fixed; optimize .length usage in populate #2289
  1842. 3.9.2 / 2014-09-08
  1843. ==================
  1844. * added; test coverage for browser component #2255
  1845. * added; in-order execution of validators #2243
  1846. * added; custom fields for validators #2132
  1847. * removed; exception thrown when find() used with count() #1950
  1848. 3.8.16 / 2014-09-08
  1849. ==================
  1850. * fixed; properly remove modified array paths if array has been overwritten #1638
  1851. * fixed; key check errors #1884
  1852. * fixed; make sure populate on an array always returns a Mongoose array #2214
  1853. * fixed; SSL connections with node 0.11 #2234
  1854. * fixed; return sensible strings for promise errors #2239
  1855. 3.9.1 / 2014-08-17
  1856. ==================
  1857. * added; alpha version of browser-side schema validation #2254
  1858. * added; support passing a function to schemas `required` field #2247
  1859. * added; support for setting updatedAt and createdAt timestamps #2227
  1860. * added; document.validate() returns a promise #2131
  1861. 3.8.15 / 2014-08-17
  1862. ==================
  1863. * fixed; Replica set connection string example in docs #2246
  1864. * fixed; bubble up parseError event #2229
  1865. * fixed; removed buggy populate cache #2176
  1866. * fixed; dont $inc versionKey if its being $set #1933
  1867. * fixed; cast $or and $and in $pull #1932
  1868. * fixed; properly cast to schema in stream() #1862
  1869. * fixed; memory leak in nested objects #1565 #2211 [devongovett](https://github.com/devongovett)
  1870. 3.8.14 / 2014-07-26
  1871. ==================
  1872. * fixed; stringifying MongooseArray shows nested arrays #2002
  1873. * fixed; use populated doc schema in toObject and toJSON by default #2035
  1874. * fixed; dont crash on arrays containing null #2140
  1875. * fixed; model.update w/ upsert has same return values on .exec and promise #2143
  1876. * fixed; better handling for populate limit with multiple documents #2151
  1877. * fixed; dont prevent users from adding weights to text index #2183
  1878. * fixed; helper for aggregation cursor #2187
  1879. * updated; node-mongodb-native to 1.4.7
  1880. 3.8.13 / 2014-07-15
  1881. ==================
  1882. * fixed; memory leak with isNew events #2159
  1883. * fixed; docs for overwrite option for update() #2144
  1884. * fixed; storeShard() handles dates properly #2127
  1885. * fixed; sub-doc changes not getting persisted to db after save #2082
  1886. * fixed; populate with _id: 0 actually removes _id instead of setting to undefined #2123
  1887. * fixed; save versionKey on findOneAndUpdate w/ upsert #2122
  1888. * fixed; fix typo in 2.8 docs #2120 [shakirullahi](https://github.com/shakirullahi)
  1889. * fixed; support maxTimeMs #2102 [yuukinajima](https://github.com/yuukinajima)
  1890. * fixed; support $currentDate #2019
  1891. * fixed; $addToSet handles objects without _ids properly #1973
  1892. * fixed; dont crash on invalid nearSphere query #1874
  1893. 3.8.12 / 2014-05-30
  1894. ==================
  1895. * fixed; single-server reconnect event fires #1672
  1896. * fixed; sub-docs not saved when pushed into populated array #1794
  1897. * fixed; .set() sometimes converts embedded docs to pojos #1954 [archangel-irk](https://github.com/archangel-irk)
  1898. * fixed; sub-doc changes not getting persisted to db after save #2082
  1899. * fixed; custom getter might cause mongoose to mistakenly think a path is dirty #2100 [pgherveou](https://github.com/pgherveou)
  1900. * fixed; chainable helper for allowDiskUse option in aggregation #2114
  1901. 3.9.0 (unstable) / 2014-05-22
  1902. ==================
  1903. * changed; added `domain` to reserved keywords #1338 #2052 [antoinepairet](https://github.com/antoinepairet)
  1904. * added; asynchronous post hooks #1977 #2081 [chopachom](https://github.com/chopachom) [JasonGhent](https://github.com/JasonGhent)
  1905. * added; using model for population, cross-db populate [mihai-chiorean](https://github.com/mihai-chiorean)
  1906. * added; can define a type for schema validators
  1907. * added; `doc.remove()` returns a promise #1619 [refack](https://github.com/refack)
  1908. * added; internal promises for hooks, pre-save hooks run in parallel #1732 [refack](https://github.com/refack)
  1909. * fixed; geoSearch hanging when no results returned #1846 [ghartnett](https://github.com/ghartnett)
  1910. * fixed; do not set .type property on ValidationError, use .kind instead #1323
  1911. 3.8.11 / 2014-05-22
  1912. ==================
  1913. * updated; node-mongodb-native to 1.4.5
  1914. * reverted; #2052, fixes #2097
  1915. 3.8.10 / 2014-05-20
  1916. ==================
  1917. * updated; node-mongodb-native to 1.4.4
  1918. * fixed; _.isEqual false negatives bug in js-bson #2070
  1919. * fixed; missing check for schema.options #2014
  1920. * fixed; missing support for $position #2024
  1921. * fixed; options object corruption #2049
  1922. * fixed; improvements to virtuals docs #2055
  1923. * fixed; added `domain` to reserved keywords #2052 #1338
  1924. 3.8.9 / 2014-05-08
  1925. ==================
  1926. * updated; mquery to 0.7.0
  1927. * updated; node-mongodb-native to 1.4.3
  1928. * fixed; $near failing against MongoDB 2.6
  1929. * fixed; relying on .options() to determine if collection exists
  1930. * fixed; $out aggregate helper
  1931. * fixed; all test failures against MongoDB 2.6.1, with caveat #2065
  1932. 3.8.8 / 2014-02-22
  1933. ==================
  1934. * fixed; saving Buffers #1914
  1935. * updated; expose connection states for user-land #1926 [yorkie](https://github.com/yorkie)
  1936. * updated; mquery to 0.5.3
  1937. * updated; added get / set to reserved path list #1903 [tstrimple](https://github.com/tstrimple)
  1938. * docs; README code highlighting, syntax fixes #1930 [IonicaBizau](https://github.com/IonicaBizau)
  1939. * docs; fixes link in the doc at #1925 [kapeels](https://github.com/kapeels)
  1940. * docs; add a missed word 'hook' for the description of the post-hook api #1924 [ipoval](https://github.com/ipoval)
  1941. 3.8.7 / 2014-02-09
  1942. ==================
  1943. * fixed; sending safe/read options in Query#exec #1895
  1944. * fixed; findOneAnd..() with sort #1887
  1945. 3.8.6 / 2014-01-30
  1946. ==================
  1947. * fixed; setting readPreferences #1895
  1948. 3.8.5 / 2014-01-23
  1949. ==================
  1950. * fixed; ssl setting when using URI #1882
  1951. * fixed; findByIdAndUpdate now respects the overwrite option #1809 [owenallenaz](https://github.com/owenallenaz)
  1952. 3.8.4 / 2014-01-07
  1953. ==================
  1954. * updated; mongodb driver to 1.3.23
  1955. * updated; mquery to 0.4.1
  1956. * updated; mpromise to 0.4.3
  1957. * fixed; discriminators now work when selecting fields #1820 [daemon1981](https://github.com/daemon1981)
  1958. * fixed; geoSearch with no results timeout #1846 [ghartnett](https://github.com/ghartnett)
  1959. * fixed; infitite recursion in ValidationError #1834 [chetverikov](https://github.com/chetverikov)
  1960. 3.8.3 / 2013-12-17
  1961. ==================
  1962. * fixed; setting empty array with model.update #1838
  1963. * docs; fix url
  1964. 3.8.2 / 2013-12-14
  1965. ==================
  1966. * fixed; enum validation of multiple values #1778 [heroicyang](https://github.com/heroicyang)
  1967. * fixed; global var leak #1803
  1968. * fixed; post remove now fires on subdocs #1810
  1969. * fixed; no longer set default empty array for geospatial-indexed fields #1668 [shirish87](https://github.com/shirish87)
  1970. * fixed; model.stream() not hydrating discriminators correctly #1792 [j](https://github.com/j)
  1971. * docs: Stablility -> Stability [nikmartin](https://github.com/nikmartin)
  1972. * tests; improve shard error handling
  1973. 3.8.1 / 2013-11-19
  1974. ==================
  1975. * fixed; mishandling of Dates with minimize/getters #1764
  1976. * fixed; Normalize bugs.email, so `npm` will shut up #1769 [refack](https://github.com/refack)
  1977. * docs; Improve the grammar where "lets us" was used #1777 [alexyoung](https://github.com/alexyoung)
  1978. * docs; Fix some grammatical issues in the documentation #1777 [alexyoung](https://github.com/alexyoung)
  1979. * docs; fix Query api exposure
  1980. * docs; fix return description
  1981. * docs; Added Notes on findAndUpdate() #1750 [sstadelman](https://github.com/sstadelman)
  1982. * docs; Update version number in README #1762 [Fodi69](https://github.com/Fodi69)
  1983. 3.8.0 / 2013-10-31
  1984. ==================
  1985. * updated; warn when using an unstable version
  1986. * updated; error message returned in doc.save() #1595
  1987. * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
  1988. * updated; mquery to 0.3.2
  1989. * updated; mocha to 1.12.0
  1990. * updated; mpromise 0.3.0
  1991. * updated; sliced 0.0.5
  1992. * removed; mongoose.Error.DocumentError (never used)
  1993. * removed; namedscope (undocumented and broken) #679 #642 #455 #379
  1994. * changed; no longer offically supporting node 0.6.x
  1995. * changed; query.within getter is now a method -> query.within()
  1996. * changed; query.intersects getter is now a method -> query.intersects()
  1997. * added; custom error msgs for built-in validators #747
  1998. * added; discriminator support #1647 #1003 [j](https://github.com/j)
  1999. * added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
  2000. * added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
  2001. * added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
  2002. * added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
  2003. * added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
  2004. * added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
  2005. * added; promise support to model.mapReduce()
  2006. * added; promise support to model.ensureIndexes()
  2007. * added; promise support to model.populate()
  2008. * added; benchmarks [ebensing](https://github.com/ebensing)
  2009. * added; publicly exposed connection states #1585
  2010. * added; $geoWithin support #1529 $1455 [ebensing](https://github.com/ebensing)
  2011. * added; query method chain validation
  2012. * added; model.update `overwrite` option
  2013. * added; model.geoNear() support #1563 [ebensing](https://github.com/ebensing)
  2014. * added; model.geoSearch() support #1560 [ebensing](https://github.com/ebensing)
  2015. * added; MongooseBuffer#subtype()
  2016. * added; model.create() now returns a promise #1340
  2017. * added; support for `awaitdata` query option
  2018. * added; pass the doc to doc.remove() callback #1419 [JoeWagner](https://github.com/JoeWagner)
  2019. * added; aggregation query builder #1404 [njoyard](https://github.com/njoyard)
  2020. * fixed; document.toObject when using `minimize` and `getters` options #1607 [JedWatson](https://github.com/JedWatson)
  2021. * fixed; Mixed types can now be required #1722 [Reggino](https://github.com/Reggino)
  2022. * fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
  2023. * fixed; repopulating modified populated paths #1697
  2024. * fixed; doc.equals() when _id option is set to false #1687
  2025. * fixed; strict mode warnings #1686
  2026. * fixed; $near GeoJSON casting #1683
  2027. * fixed; nearSphere GeoJSON query builder
  2028. * fixed; population field selection w/ strings #1669
  2029. * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
  2030. * fixed; handle another versioning edge case #1520
  2031. * fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
  2032. * fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
  2033. * fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
  2034. * fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
  2035. * fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
  2036. * fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
  2037. * fixed; model.remove() removes only what is necessary #1649
  2038. * fixed; update() now only runs with cb or explicit true #1644
  2039. * fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
  2040. * fixed; model.update "overwrite" option works as documented
  2041. * fixed; query#remove() works as documented
  2042. * fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
  2043. * fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
  2044. * fixed; benchmarks to actually output valid json
  2045. * deprecated; promise#addBack (use promise#onResolve)
  2046. * deprecated; promise#complete (use promise#fulfill)
  2047. * deprecated; promise#addCallback (use promise#onFulFill)
  2048. * deprecated; promise#addErrback (use promise#onReject)
  2049. * deprecated; query.nearSphere() (use query.near)
  2050. * deprecated; query.center() (use query.circle)
  2051. * deprecated; query.centerSphere() (use query.circle)
  2052. * deprecated; query#slaveOk (use query#read)
  2053. * docs; custom validator messages
  2054. * docs; 10gen -> MongoDB
  2055. * docs; add Date method caveats #1598
  2056. * docs; more validation details
  2057. * docs; state which branch is stable/unstable
  2058. * docs; mention that middleware does not run on Models
  2059. * docs; promise.fulfill()
  2060. * docs; fix readme spelling #1483 [yorchopolis](https://github.com/yorchopolis)
  2061. * docs; fixed up the README and examples [ebensing](https://github.com/ebensing)
  2062. * website; add "show code" for properties
  2063. * website; move "show code" links down
  2064. * website; update guide
  2065. * website; add unstable docs
  2066. * website; many improvements
  2067. * website; fix copyright #1439
  2068. * website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
  2069. * tests; refactor 1703
  2070. * tests; add test generator
  2071. * tests; validate formatMessage() throws
  2072. * tests; add script for continuously running tests
  2073. * tests; fixed versioning tests
  2074. * tests; race conditions in tests
  2075. * tests; added for nested and/or queries
  2076. * tests; close some test connections
  2077. * tests; validate db contents
  2078. * tests; remove .only
  2079. * tests; close some test connections
  2080. * tests; validate db contents
  2081. * tests; remove .only
  2082. * tests; replace deprecated method names
  2083. * tests; convert id to string
  2084. * tests; fix sharding tests for MongoDB 2.4.5
  2085. * tests; now 4-5 seconds faster
  2086. * tests; fix race condition
  2087. * make; suppress warning msg in test
  2088. * benchmarks; updated for pull requests
  2089. * examples; improved and expanded [ebensing](https://github.com/ebensing)
  2090. 3.7.4 (unstable) / 2013-10-01
  2091. =============================
  2092. * updated; mquery to 0.3.2
  2093. * removed; mongoose.Error.DocumentError (never used)
  2094. * added; custom error msgs for built-in validators #747
  2095. * added; discriminator support #1647 #1003 [j](https://github.com/j)
  2096. * added; support disabled collection name pluralization #1350 #1707 [refack](https://github.com/refack)
  2097. * fixed; do not pluralize model names not ending with letters #1703 [refack](https://github.com/refack)
  2098. * fixed; repopulating modified populated paths #1697
  2099. * fixed; doc.equals() when _id option is set to false #1687
  2100. * fixed; strict mode warnings #1686
  2101. * fixed; $near GeoJSON casting #1683
  2102. * fixed; nearSphere GeoJSON query builder
  2103. * fixed; population field selection w/ strings #1669
  2104. * docs; custom validator messages
  2105. * docs; 10gen -> MongoDB
  2106. * docs; add Date method caveats #1598
  2107. * docs; more validation details
  2108. * website; add "show code" for properties
  2109. * website; move "show code" links down
  2110. * tests; refactor 1703
  2111. * tests; add test generator
  2112. * tests; validate formatMessage() throws
  2113. 3.7.3 (unstable) / 2013-08-22
  2114. =============================
  2115. * updated; warn when using an unstable version
  2116. * updated; mquery to 0.3.1
  2117. * updated; mocha to 1.12.0
  2118. * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
  2119. * changed; no longer offically supporting node 0.6.x
  2120. * added; support for GeoJSON to Query#near [ebensing](https://github.com/ebensing)
  2121. * added; stand-alone base query support - query.toConstructor() [ebensing](https://github.com/ebensing)
  2122. * added; promise support to geoSearch #1614 [ebensing](https://github.com/ebensing)
  2123. * added; promise support for geoNear #1614 [ebensing](https://github.com/ebensing)
  2124. * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
  2125. * fixed; handle another versioning edge case #1520
  2126. * fixed; excluding subdocument fields #1280 [ebensing](https://github.com/ebensing)
  2127. * fixed; allow array properties to be set to null with findOneAndUpdate [aheuermann](https://github.com/aheuermann)
  2128. * fixed; subdocuments now use own toJSON opts #1376 [ebensing](https://github.com/ebensing)
  2129. * fixed; model#geoNear fulfills promise when results empty #1658 [ebensing](https://github.com/ebensing)
  2130. * fixed; utils.merge no longer overrides props and methods #1655 [j](https://github.com/j)
  2131. * fixed; subdocuments now use their own transform #1412 [ebensing](https://github.com/ebensing)
  2132. * make; suppress warning msg in test
  2133. * docs; state which branch is stable/unstable
  2134. * docs; mention that middleware does not run on Models
  2135. * tests; add script for continuously running tests
  2136. * tests; fixed versioning tests
  2137. * benchmarks; updated for pull requests
  2138. 3.7.2 (unstable) / 2013-08-15
  2139. ==================
  2140. * fixed; model.remove() removes only what is necessary #1649
  2141. * fixed; update() now only runs with cb or explicit true #1644
  2142. * tests; race conditions in tests
  2143. * website; update guide
  2144. 3.7.1 (unstable) / 2013-08-13
  2145. =============================
  2146. * updated; driver to 1.3.18 (fixes memory leak)
  2147. * added; connection.useDb() #1124 [ebensing](https://github.com/ebensing)
  2148. * added; promise support to model.mapReduce()
  2149. * added; promise support to model.ensureIndexes()
  2150. * added; promise support to model.populate()
  2151. * fixed; casting ref docs on creation #1606 [ebensing](https://github.com/ebensing)
  2152. * fixed; model.update "overwrite" option works as documented
  2153. * fixed; query#remove() works as documented
  2154. * fixed; "limit" correctly applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
  2155. * fixed; issue with positional operator on ref docs #1572 [ebensing](https://github.com/ebensing)
  2156. * fixed; benchmarks to actually output valid json
  2157. * tests; added for nested and/or queries
  2158. * tests; close some test connections
  2159. * tests; validate db contents
  2160. * tests; remove .only
  2161. * tests; close some test connections
  2162. * tests; validate db contents
  2163. * tests; remove .only
  2164. * tests; replace deprecated method names
  2165. * tests; convert id to string
  2166. * docs; promise.fulfill()
  2167. 3.7.0 (unstable) / 2013-08-05
  2168. ===================
  2169. * changed; query.within getter is now a method -> query.within()
  2170. * changed; query.intersects getter is now a method -> query.intersects()
  2171. * deprecated; promise#addBack (use promise#onResolve)
  2172. * deprecated; promise#complete (use promise#fulfill)
  2173. * deprecated; promise#addCallback (use promise#onFulFill)
  2174. * deprecated; promise#addErrback (use promise#onReject)
  2175. * deprecated; query.nearSphere() (use query.near)
  2176. * deprecated; query.center() (use query.circle)
  2177. * deprecated; query.centerSphere() (use query.circle)
  2178. * deprecated; query#slaveOk (use query#read)
  2179. * removed; namedscope (undocumented and broken) #679 #642 #455 #379
  2180. * added; benchmarks [ebensing](https://github.com/ebensing)
  2181. * added; publicly exposed connection states #1585
  2182. * added; $geoWithin support #1529 $1455 [ebensing](https://github.com/ebensing)
  2183. * added; query method chain validation
  2184. * added; model.update `overwrite` option
  2185. * added; model.geoNear() support #1563 [ebensing](https://github.com/ebensing)
  2186. * added; model.geoSearch() support #1560 [ebensing](https://github.com/ebensing)
  2187. * added; MongooseBuffer#subtype()
  2188. * added; model.create() now returns a promise #1340
  2189. * added; support for `awaitdata` query option
  2190. * added; pass the doc to doc.remove() callback #1419 [JoeWagner](https://github.com/JoeWagner)
  2191. * added; aggregation query builder #1404 [njoyard](https://github.com/njoyard)
  2192. * updated; integrate mquery #1562 [ebensing](https://github.com/ebensing)
  2193. * updated; error msg in doc.save() #1595
  2194. * updated; bump driver to 1.3.15
  2195. * updated; mpromise 0.3.0
  2196. * updated; sliced 0.0.5
  2197. * tests; fix sharding tests for MongoDB 2.4.5
  2198. * tests; now 4-5 seconds faster
  2199. * tests; fix race condition
  2200. * docs; fix readme spelling #1483 [yorchopolis](https://github.com/yorchopolis)
  2201. * docs; fixed up the README and examples [ebensing](https://github.com/ebensing)
  2202. * website; add unstable docs
  2203. * website; many improvements
  2204. * website; fix copyright #1439
  2205. * website; server.js -> static.js #1546 [nikmartin](https://github.com/nikmartin)
  2206. * examples; improved and expanded [ebensing](https://github.com/ebensing)
  2207. 3.6.20 (stable) / 2013-09-23
  2208. ===================
  2209. * fixed; repopulating modified populated paths #1697
  2210. * fixed; doc.equals w/ _id false #1687
  2211. * fixed; strict mode warning #1686
  2212. * docs; near/nearSphere
  2213. 3.6.19 (stable) / 2013-09-04
  2214. ==================
  2215. * fixed; population field selection w/ strings #1669
  2216. * docs; Date method caveats #1598
  2217. 3.6.18 (stable) / 2013-08-22
  2218. ===================
  2219. * updated; warn when using an unstable version of mongoose
  2220. * updated; mocha to 1.12.0
  2221. * updated; mongodb driver to 1.3.19 (fix error swallowing behavior)
  2222. * fixed; setters not firing on null values #1445 [ebensing](https://github.com/ebensing)
  2223. * fixed; properly exclude subdocument fields #1280 [ebensing](https://github.com/ebensing)
  2224. * fixed; cast error in findAndModify #1643 [aheuermann](https://github.com/aheuermann)
  2225. * website; update guide
  2226. * website; added documentation for safe:false and versioning interaction
  2227. * docs; mention that middleware dont run on Models
  2228. * docs; fix indexes link
  2229. * make; suppress warning msg in test
  2230. * tests; moar
  2231. 3.6.17 / 2013-08-13
  2232. ===================
  2233. * updated; driver to 1.3.18 (fixes memory leak)
  2234. * fixed; casting ref docs on creation #1606
  2235. * docs; query options
  2236. 3.6.16 / 2013-08-08
  2237. ===================
  2238. * added; publicly expose connection states #1585
  2239. * fixed; limit applies to individual items on population #1490 [ebensing](https://github.com/ebensing)
  2240. * fixed; positional operator casting in updates #1572 [ebensing](https://github.com/ebensing)
  2241. * updated; MongoDB driver to 1.3.17
  2242. * updated; sliced to 0.0.5
  2243. * website; tweak homepage
  2244. * tests; fixed + added
  2245. * docs; fix some examples
  2246. * docs; multi-mongos support details
  2247. * docs; auto open browser after starting static server
  2248. 3.6.15 / 2013-07-16
  2249. ==================
  2250. * added; mongos failover support #1037
  2251. * updated; make schematype return vals return self #1580
  2252. * docs; add note to model.update #571
  2253. * docs; document third param to document.save callback #1536
  2254. * tests; tweek mongos test timeout
  2255. 3.6.14 / 2013-07-05
  2256. ===================
  2257. * updated; driver to 1.3.11
  2258. * fixed; issue with findOneAndUpdate not returning null on upserts #1533 [ebensing](https://github.com/ebensing)
  2259. * fixed; missing return statement in SchemaArray#$geoIntersects() #1498 [bsrykt](https://github.com/bsrykt)
  2260. * fixed; wrong isSelected() behavior #1521 [kyano](https://github.com/kyano)
  2261. * docs; note about toObject behavior during save()
  2262. * docs; add callbacks details #1547 [nikmartin](https://github.com/nikmartin)
  2263. 3.6.13 / 2013-06-27
  2264. ===================
  2265. * fixed; calling model.distinct without conditions #1541
  2266. * fixed; regression in Query#count() #1542
  2267. * now working on 3.6.13
  2268. 3.6.12 / 2013-06-25
  2269. ===================
  2270. * updated; driver to 1.3.10
  2271. * updated; clearer capped collection error message #1509 [bitmage](https://github.com/bitmage)
  2272. * fixed; MongooseBuffer subtype loss during casting #1517 [zedgu](https://github.com/zedgu)
  2273. * fixed; docArray#id when doc.id is disabled #1492
  2274. * fixed; docArray#id now supports matches on populated arrays #1492 [pgherveou](https://github.com/pgherveou)
  2275. * website; fix example
  2276. * website; improve _id disabling example
  2277. * website; fix typo #1494 [dejj](https://github.com/dejj)
  2278. * docs; added a 'Requesting new features' section #1504 [shovon](https://github.com/shovon)
  2279. * docs; improve subtypes description
  2280. * docs; clarify _id disabling
  2281. * docs: display by alphabetical order the methods list #1508 [nicolasleger](https://github.com/nicolasleger)
  2282. * tests; refactor isSelected checks
  2283. * tests; remove pointless test
  2284. * tests; fixed timeouts
  2285. 3.6.11 / 2013-05-15
  2286. ===================
  2287. * updated; driver to 1.3.5
  2288. * fixed; compat w/ Object.create(null) #1484 #1485
  2289. * fixed; cloning objects w/ missing constructors
  2290. * fixed; prevent multiple min number validators #1481 [nrako](https://github.com/nrako)
  2291. * docs; add doc.increment() example
  2292. * docs; add $size example
  2293. * docs; add "distinct" example
  2294. 3.6.10 / 2013-05-09
  2295. ==================
  2296. * update driver to 1.3.3
  2297. * fixed; increment() works without other changes #1475
  2298. * website; fix links to posterous
  2299. * docs; fix link #1472
  2300. 3.6.9 / 2013-05-02
  2301. ==================
  2302. * fixed; depopulation of mixed documents #1471
  2303. * fixed; use of $options in array #1462
  2304. * tests; fix race condition
  2305. * docs; fix default example
  2306. 3.6.8 / 2013-04-25
  2307. ==================
  2308. * updated; driver to 1.3.0
  2309. * fixed; connection.model should retain options #1458 [vedmalex](https://github.com/vedmalex)
  2310. * tests; 4-5 seconds faster
  2311. 3.6.7 / 2013-04-19
  2312. ==================
  2313. * fixed; population regression in 3.6.6 #1444
  2314. 3.6.6 / 2013-04-18
  2315. ==================
  2316. * fixed; saving populated new documents #1442
  2317. * fixed; population regession in 3.6.5 #1441
  2318. * website; fix copyright #1439
  2319. 3.6.5 / 2013-04-15
  2320. ==================
  2321. * fixed; strict:throw edge case using .set(path, val)
  2322. * fixed; schema.pathType() on some numbericAlpha paths
  2323. * fixed; numbericAlpha path versioning
  2324. * fixed; setting nested mixed paths #1418
  2325. * fixed; setting nested objects with null prop #1326
  2326. * fixed; regression in v3.6 population performance #1426 [vedmalex](https://github.com/vedmalex)
  2327. * fixed; read pref typos #1422 [kyano](https://github.com/kyano)
  2328. * docs; fix method example
  2329. * website; update faq
  2330. * website; add more deep links
  2331. * website; update poolSize docs
  2332. * website; add 3.6 release notes
  2333. * website; note about keepAlive
  2334. 3.6.4 / 2013-04-03
  2335. ==================
  2336. * fixed; +field conflict with $slice #1370
  2337. * fixed; nested deselection conflict #1333
  2338. * fixed; RangeError in ValidationError.toString() #1296
  2339. * fixed; do not save user defined transforms #1415
  2340. * tests; fix race condition
  2341. 3.6.3 / 2013-04-02
  2342. ==================
  2343. * fixed; setting subdocuments deeply nested fields #1394
  2344. * fixed; regression: populated streams #1411
  2345. * docs; mention hooks/validation with findAndModify
  2346. * docs; mention auth
  2347. * docs; add more links
  2348. * examples; add document methods example
  2349. * website; display "see" links for properties
  2350. * website; clean up homepage
  2351. 3.6.2 / 2013-03-29
  2352. ==================
  2353. * fixed; corrupted sub-doc array #1408
  2354. * fixed; document#update returns a Query #1397
  2355. * docs; readpref strategy
  2356. 3.6.1 / 2013-03-27
  2357. ==================
  2358. * added; populate support to findAndModify varients #1395
  2359. * added; text index type to schematypes
  2360. * expose allowed index types as Schema.indexTypes
  2361. * fixed; use of `setMaxListeners` as path
  2362. * fixed; regression in node 0.6 on docs with > 10 arrays
  2363. * fixed; do not alter schema arguments #1364
  2364. * fixed; subdoc#ownerDocument() #1385
  2365. * website; change search id
  2366. * website; add search from google [jackdbernier](https://github.com/jackdbernier)
  2367. * website; fix link
  2368. * website; add 3.5.x docs release
  2369. * website; fix link
  2370. * docs; fix geometry
  2371. * docs; hide internal constructor
  2372. * docs; aggregation does not cast arguments #1399
  2373. * docs; querystream options
  2374. * examples; added for population
  2375. 3.6.0 / 2013-03-18
  2376. ==================
  2377. * changed; cast 'true'/'false' to boolean #1282 [mgrach](https://github.com/mgrach)
  2378. * changed; Buffer arrays can now contain nulls
  2379. * added; QueryStream transform option
  2380. * added; support for authSource driver option
  2381. * added; {mongoose,db}.modelNames()
  2382. * added; $push w/ $slice,$sort support (MongoDB 2.4)
  2383. * added; hashed index type (MongoDB 2.4)
  2384. * added; support for mongodb 2.4 geojson (MongoDB 2.4)
  2385. * added; value at time of validation error
  2386. * added; support for object literal schemas
  2387. * added; bufferCommands schema option
  2388. * added; allow auth option in connections #1360 [geoah](https://github.com/geoah)
  2389. * added; performance improvements to populate() [263ece9](https://github.com/LearnBoost/mongoose/commit/263ece9)
  2390. * added; allow adding uncasted docs to populated arrays and properties #570
  2391. * added; doc#populated(path) stores original populated _ids
  2392. * added; lean population #1260
  2393. * added; query.populate() now accepts an options object
  2394. * added; document#populate(opts, callback)
  2395. * added; Model.populate(docs, opts, callback)
  2396. * added; support for rich nested path population
  2397. * added; doc.array.remove(value) subdoc with _id value support #1278
  2398. * added; optionally allow non-strict sets and updates
  2399. * added; promises/A+ comformancy with [mpromise](https://github.com/aheckmann/mpromise)
  2400. * added; promise#then
  2401. * added; promise#end
  2402. * fixed; use of `model` as doc property
  2403. * fixed; lean population #1382
  2404. * fixed; empty object mixed defaults #1380
  2405. * fixed; populate w/ deselected _id using string syntax
  2406. * fixed; attempted save of divergent populated arrays #1334 related
  2407. * fixed; better error msg when attempting toObject as property name
  2408. * fixed; non population buffer casting from doc
  2409. * fixed; setting populated paths #570
  2410. * fixed; casting when added docs to populated arrays #570
  2411. * fixed; prohibit updating arrays selected with $elemMatch #1334
  2412. * fixed; pull / set subdoc combination #1303
  2413. * fixed; multiple bg index creation #1365
  2414. * fixed; manual reconnection to single mongod
  2415. * fixed; Constructor / version exposure #1124
  2416. * fixed; CastError race condition
  2417. * fixed; no longer swallowing misuse of subdoc#invalidate()
  2418. * fixed; utils.clone retains RegExp opts
  2419. * fixed; population of non-schema property
  2420. * fixed; allow updating versionKey #1265
  2421. * fixed; add EventEmitter props to reserved paths #1338
  2422. * fixed; can now deselect populated doc _ids #1331
  2423. * fixed; properly pass subtype to Binary in MongooseBuffer
  2424. * fixed; casting _id from document with non-ObjectId _id
  2425. * fixed; specifying schema type edge case { path: [{type: "String" }] }
  2426. * fixed; typo in schemdate #1329 [jplock](https://github.com/jplock)
  2427. * updated; driver to 1.2.14
  2428. * updated; muri to 0.3.1
  2429. * updated; mpromise to 0.2.1
  2430. * updated; mocha 1.8.1
  2431. * updated; mpath to 0.1.1
  2432. * deprecated; pluralization will die in 4.x
  2433. * refactor; rename private methods to something unusable as doc properties
  2434. * refactor MongooseArray#remove
  2435. * refactor; move expires index to SchemaDate #1328
  2436. * refactor; internal document properties #1171 #1184
  2437. * tests; added
  2438. * docs; indexes
  2439. * docs; validation
  2440. * docs; populate
  2441. * docs; populate
  2442. * docs; add note about stream compatibility with node 0.8
  2443. * docs; fix for private names
  2444. * docs; Buffer -> mongodb.Binary #1363
  2445. * docs; auth options
  2446. * docs; improved
  2447. * website; update FAQ
  2448. * website; add more api links
  2449. * website; add 3.5.x docs to prior releases
  2450. * website; Change mongoose-types to an active repo [jackdbernier](https://github.com/jackdbernier)
  2451. * website; compat with node 0.10
  2452. * website; add news section
  2453. * website; use T for generic type
  2454. * benchmark; make adjustable
  2455. 3.6.0rc1 / 2013-03-12
  2456. ======================
  2457. * refactor; rename private methods to something unusable as doc properties
  2458. * added; {mongoose,db}.modelNames()
  2459. * added; $push w/ $slice,$sort support (MongoDB 2.4)
  2460. * added; hashed index type (MongoDB 2.4)
  2461. * added; support for mongodb 2.4 geojson (MongoDB 2.4)
  2462. * added; value at time of validation error
  2463. * added; support for object literal schemas
  2464. * added; bufferCommands schema option
  2465. * added; allow auth option in connections #1360 [geoah](https://github.com/geoah)
  2466. * fixed; lean population #1382
  2467. * fixed; empty object mixed defaults #1380
  2468. * fixed; populate w/ deselected _id using string syntax
  2469. * fixed; attempted save of divergent populated arrays #1334 related
  2470. * fixed; better error msg when attempting toObject as property name
  2471. * fixed; non population buffer casting from doc
  2472. * fixed; setting populated paths #570
  2473. * fixed; casting when added docs to populated arrays #570
  2474. * fixed; prohibit updating arrays selected with $elemMatch #1334
  2475. * fixed; pull / set subdoc combination #1303
  2476. * fixed; multiple bg index creation #1365
  2477. * fixed; manual reconnection to single mongod
  2478. * fixed; Constructor / version exposure #1124
  2479. * fixed; CastError race condition
  2480. * fixed; no longer swallowing misuse of subdoc#invalidate()
  2481. * fixed; utils.clone retains RegExp opts
  2482. * fixed; population of non-schema property
  2483. * fixed; allow updating versionKey #1265
  2484. * fixed; add EventEmitter props to reserved paths #1338
  2485. * fixed; can now deselect populated doc _ids #1331
  2486. * updated; muri to 0.3.1
  2487. * updated; driver to 1.2.12
  2488. * updated; mpromise to 0.2.1
  2489. * deprecated; pluralization will die in 4.x
  2490. * docs; Buffer -> mongodb.Binary #1363
  2491. * docs; auth options
  2492. * docs; improved
  2493. * website; add news section
  2494. * benchmark; make adjustable
  2495. 3.6.0rc0 / 2013-02-03
  2496. ======================
  2497. * changed; cast 'true'/'false' to boolean #1282 [mgrach](https://github.com/mgrach)
  2498. * changed; Buffer arrays can now contain nulls
  2499. * fixed; properly pass subtype to Binary in MongooseBuffer
  2500. * fixed; casting _id from document with non-ObjectId _id
  2501. * fixed; specifying schema type edge case { path: [{type: "String" }] }
  2502. * fixed; typo in schemdate #1329 [jplock](https://github.com/jplock)
  2503. * refactor; move expires index to SchemaDate #1328
  2504. * refactor; internal document properties #1171 #1184
  2505. * added; performance improvements to populate() [263ece9](https://github.com/LearnBoost/mongoose/commit/263ece9)
  2506. * added; allow adding uncasted docs to populated arrays and properties #570
  2507. * added; doc#populated(path) stores original populated _ids
  2508. * added; lean population #1260
  2509. * added; query.populate() now accepts an options object
  2510. * added; document#populate(opts, callback)
  2511. * added; Model.populate(docs, opts, callback)
  2512. * added; support for rich nested path population
  2513. * added; doc.array.remove(value) subdoc with _id value support #1278
  2514. * added; optionally allow non-strict sets and updates
  2515. * added; promises/A+ comformancy with [mpromise](https://github.com/aheckmann/mpromise)
  2516. * added; promise#then
  2517. * added; promise#end
  2518. * updated; mocha 1.8.1
  2519. * updated; muri to 0.3.0
  2520. * updated; mpath to 0.1.1
  2521. * updated; docs
  2522. 3.5.16 / 2013-08-13
  2523. ===================
  2524. * updated; driver to 1.3.18
  2525. 3.5.15 / 2013-07-26
  2526. ==================
  2527. * updated; sliced to 0.0.5
  2528. * updated; driver to 1.3.12
  2529. * fixed; regression in Query#count() due to driver change
  2530. * tests; fixed timeouts
  2531. * tests; handle differing test uris
  2532. 3.5.14 / 2013-05-15
  2533. ===================
  2534. * updated; driver to 1.3.5
  2535. * fixed; compat w/ Object.create(null) #1484 #1485
  2536. * fixed; cloning objects missing constructors
  2537. * fixed; prevent multiple min number validators #1481 [nrako](https://github.com/nrako)
  2538. 3.5.13 / 2013-05-09
  2539. ==================
  2540. * update driver to 1.3.3
  2541. * fixed; use of $options in array #1462
  2542. 3.5.12 / 2013-04-25
  2543. ===================
  2544. * updated; driver to 1.3.0
  2545. * fixed; connection.model should retain options #1458 [vedmalex](https://github.com/vedmalex)
  2546. * fixed; read pref typos #1422 [kyano](https://github.com/kyano)
  2547. 3.5.11 / 2013-04-03
  2548. ==================
  2549. * fixed; +field conflict with $slice #1370
  2550. * fixed; RangeError in ValidationError.toString() #1296
  2551. * fixed; nested deselection conflict #1333
  2552. * remove time from Makefile
  2553. 3.5.10 / 2013-04-02
  2554. ==================
  2555. * fixed; setting subdocuments deeply nested fields #1394
  2556. * fixed; do not alter schema arguments #1364
  2557. 3.5.9 / 2013-03-15
  2558. ==================
  2559. * updated; driver to 1.2.14
  2560. * added; support for authSource driver option (mongodb 2.4)
  2561. * added; QueryStream transform option (node 0.10 helper)
  2562. * fixed; backport for saving required populated buffers
  2563. * fixed; pull / set subdoc combination #1303
  2564. * fixed; multiple bg index creation #1365
  2565. * test; added for saveable required populated buffers
  2566. * test; added for #1365
  2567. * test; add authSource test
  2568. 3.5.8 / 2013-03-12
  2569. ==================
  2570. * added; auth option in connection [geoah](https://github.com/geoah)
  2571. * fixed; CastError race condition
  2572. * docs; add note about stream compatibility with node 0.8
  2573. 3.5.7 / 2013-02-22
  2574. ==================
  2575. * updated; driver to 1.2.13
  2576. * updated; muri to 0.3.1 #1347
  2577. * fixed; utils.clone retains RegExp opts #1355
  2578. * fixed; deepEquals RegExp support
  2579. * tests; fix a connection test
  2580. * website; clean up docs [afshinm](https://github.com/afshinm)
  2581. * website; update homepage
  2582. * website; migragtion: emphasize impact of strict docs #1264
  2583. 3.5.6 / 2013-02-14
  2584. ==================
  2585. * updated; driver to 1.2.12
  2586. * fixed; properly pass Binary subtype
  2587. * fixed; add EventEmitter props to reserved paths #1338
  2588. * fixed; use correct node engine version
  2589. * fixed; display empty docs as {} in log output #953 follow up
  2590. * improved; "bad $within $box argument" error message
  2591. * populate; add unscientific benchmark
  2592. * website; add stack overflow to help section
  2593. * website; use better code font #1336 [risseraka](https://github.com/risseraka)
  2594. * website; clarify where help is available
  2595. * website; fix source code links #1272 [floatingLomas](https://github.com/floatingLomas)
  2596. * docs; be specific about _id schema option #1103
  2597. * docs; add ensureIndex error handling example
  2598. * docs; README
  2599. * docs; CONTRIBUTING.md
  2600. 3.5.5 / 2013-01-29
  2601. ==================
  2602. * updated; driver to 1.2.11
  2603. * removed; old node < 0.6x shims
  2604. * fixed; documents with Buffer _ids equality
  2605. * fixed; MongooseBuffer properly casts numbers
  2606. * fixed; reopening closed connection on alt host/port #1287
  2607. * docs; fixed typo in Readme #1298 [rened](https://github.com/rened)
  2608. * docs; fixed typo in migration docs [Prinzhorn](https://github.com/Prinzhorn)
  2609. * docs; fixed incorrect annotation in SchemaNumber#min [bilalq](https://github.com/bilalq)
  2610. * docs; updated
  2611. 3.5.4 / 2013-01-07
  2612. ==================
  2613. * changed; "_pres" & "_posts" are now reserved pathnames #1261
  2614. * updated; driver to 1.2.8
  2615. * fixed; exception when reopening a replica set. #1263 [ethankan](https://github.com/ethankan)
  2616. * website; updated
  2617. 3.5.3 / 2012-12-26
  2618. ==================
  2619. * added; support for geo object notation #1257
  2620. * fixed; $within query casting with arrays
  2621. * fixed; unix domain socket support #1254
  2622. * updated; driver to 1.2.7
  2623. * updated; muri to 0.0.5
  2624. 3.5.2 / 2012-12-17
  2625. ==================
  2626. * fixed; using auth with replica sets #1253
  2627. 3.5.1 / 2012-12-12
  2628. ==================
  2629. * fixed; regression when using subdoc with `path` as pathname #1245 [daeq](https://github.com/daeq)
  2630. * fixed; safer db option checks
  2631. * updated; driver to 1.2.5
  2632. * website; add more examples
  2633. * website; clean up old docs
  2634. * website; fix prev release urls
  2635. * docs; clarify streaming with HTTP responses
  2636. 3.5.0 / 2012-12-10
  2637. ==================
  2638. * added; paths to CastErrors #1239
  2639. * added; support for mongodb connection string spec #1187
  2640. * added; post validate event
  2641. * added; Schema#get (to retrieve schema options)
  2642. * added; VersionError #1071
  2643. * added; npmignore [hidekiy](https://github.com/hidekiy)
  2644. * update; driver to 1.2.3
  2645. * fixed; stackoverflow in setter #1234
  2646. * fixed; utils.isObject()
  2647. * fixed; do not clobber user specified driver writeConcern #1227
  2648. * fixed; always pass current document to post hooks
  2649. * fixed; throw error when user attempts to overwrite a model
  2650. * fixed; connection.model only caches on connection #1209
  2651. * fixed; respect conn.model() creation when matching global model exists #1209
  2652. * fixed; passing model name + collection name now always honors collection name
  2653. * fixed; setting virtual field to an empty object #1154
  2654. * fixed; subclassed MongooseErrors exposure, now available in mongoose.Error.xxxx
  2655. * fixed; model.remove() ignoring callback when executed twice [daeq](https://github.com/daeq) #1210
  2656. * docs; add collection option to schema api docs #1222
  2657. * docs; NOTE about db safe options
  2658. * docs; add post hooks docs
  2659. * docs; connection string options
  2660. * docs; middleware is not executed with Model.remove #1241
  2661. * docs; {g,s}etter introspection #777
  2662. * docs; update validation docs
  2663. * docs; add link to plugins page
  2664. * docs; clarify error returned by unique indexes #1225
  2665. * docs; more detail about disabling autoIndex behavior
  2666. * docs; add homepage section to package (npm docs mongoose)
  2667. * docs; more detail around collection name pluralization #1193
  2668. * website; add .important css
  2669. * website; update models page
  2670. * website; update getting started
  2671. * website; update quick start
  2672. 3.4.0 / 2012-11-10
  2673. ==================
  2674. * added; support for generic toJSON/toObject transforms #1160 #1020 #1197
  2675. * added; doc.set() merge support #1148 [NuORDER](https://github.com/NuORDER)
  2676. * added; query#add support #1188 [aleclofabbro](https://github.com/aleclofabbro)
  2677. * changed; adding invalid nested paths to non-objects throws 4216f14
  2678. * changed; fixed; stop invalid function cloning (internal fix)
  2679. * fixed; add query $and casting support #1180 [anotheri](https://github.com/anotheri)
  2680. * fixed; overwriting of query arguments #1176
  2681. * docs; fix expires examples
  2682. * docs; transforms
  2683. * docs; schema `collection` option docs [hermanjunge](https://github.com/hermanjunge)
  2684. * website; updated
  2685. * tests; added
  2686. 3.3.1 / 2012-10-11
  2687. ==================
  2688. * fixed; allow goose.connect(uris, dbname, opts) #1144
  2689. * docs; persist API private checked state across page loads
  2690. 3.3.0 / 2012-10-10
  2691. ==================
  2692. * fixed; passing options as 2nd arg to connect() #1144
  2693. * fixed; race condition after no-op save #1139
  2694. * fixed; schema field selection application in findAndModify #1150
  2695. * fixed; directly setting arrays #1126
  2696. * updated; driver to 1.1.11
  2697. * updated; collection pluralization rules [mrickard](https://github.com/mrickard)
  2698. * tests; added
  2699. * docs; updated
  2700. 3.2.2 / 2012-10-08
  2701. ==================
  2702. * updated; driver to 1.1.10 #1143
  2703. * updated; use sliced 0.0.3
  2704. * fixed; do not recast embedded docs unnecessarily
  2705. * fixed; expires schema option helper #1132
  2706. * fixed; built in string setters #1131
  2707. * fixed; debug output for Dates/ObjectId properties #1129
  2708. * docs; fixed Javascript syntax error in example [olalonde](https://github.com/olalonde)
  2709. * docs; fix toJSON example #1137
  2710. * docs; add ensureIndex production notes
  2711. * docs; fix spelling
  2712. * docs; add blogposts about v3
  2713. * website; updated
  2714. * removed; undocumented inGroupsOf util
  2715. * tests; added
  2716. 3.2.1 / 2012-09-28
  2717. ==================
  2718. * fixed; remove query batchSize option default of 1000 https://github.com/learnboost/mongoose/commit/3edaa8651
  2719. * docs; updated
  2720. * website; updated
  2721. 3.2.0 / 2012-09-27
  2722. ==================
  2723. * added; direct array index assignment with casting support `doc.array.set(index, value)`
  2724. * fixed; QueryStream#resume within same tick as pause() #1116
  2725. * fixed; default value validatation #1109
  2726. * fixed; array splice() not casting #1123
  2727. * fixed; default array construction edge case #1108
  2728. * fixed; query casting for inequalities in arrays #1101 [dpatti](https://github.com/dpatti)
  2729. * tests; added
  2730. * website; more documentation
  2731. * website; fixed layout issue #1111 [SlashmanX](https://github.com/SlashmanX)
  2732. * website; refactored [guille](https://github.com/guille)
  2733. 3.1.2 / 2012-09-10
  2734. ==================
  2735. * added; ReadPreferrence schema option #1097
  2736. * updated; driver to 1.1.7
  2737. * updated; default query batchSize to 1000
  2738. * fixed; we now cast the mapReduce query option #1095
  2739. * fixed; $elemMatch+$in with field selection #1091
  2740. * fixed; properly cast $elemMatch+$in conditions #1100
  2741. * fixed; default field application of subdocs #1027
  2742. * fixed; querystream prematurely dying #1092
  2743. * fixed; querystream never resumes when paused at getMore boundries #1092
  2744. * fixed; querystream occasionally emits data events after destroy #1092
  2745. * fixed; remove unnecessary ObjectId creation in querystream
  2746. * fixed; allow ne(boolean) again #1093
  2747. * docs; add populate/field selection syntax notes
  2748. * docs; add toObject/toJSON options detail
  2749. * docs; `read` schema option
  2750. 3.1.1 / 2012-08-31
  2751. ==================
  2752. * updated; driver to 1.1.6
  2753. 3.1.0 / 2012-08-29
  2754. ==================
  2755. * changed; fixed; directly setting nested objects now overwrites entire object (previously incorrectly merged them)
  2756. * added; read pref support (mongodb 2.2) 205a709c
  2757. * added; aggregate support (mongodb 2.2) f3a5bd3d
  2758. * added; virtual {g,s}etter introspection (#1070)
  2759. * updated; docs [brettz9](https://github.com/brettz9)
  2760. * updated; driver to 1.1.5
  2761. * fixed; retain virtual setter return values (#1069)
  2762. 3.0.3 / 2012-08-23
  2763. ==================
  2764. * fixed; use of nested paths beginning w/ numbers #1062
  2765. * fixed; query population edge case #1053 #1055 [jfremy](https://github.com/jfremy)
  2766. * fixed; simultaneous top and sub level array modifications #1073
  2767. * added; id and _id schema option aliases + tests
  2768. * improve debug formatting to allow copy/paste logged queries into mongo shell [eknkc](https://github.com/eknkc)
  2769. * docs
  2770. 3.0.2 / 2012-08-17
  2771. ==================
  2772. * added; missing support for v3 sort/select syntax to findAndModify helpers (#1058)
  2773. * fixed; replset fullsetup event emission
  2774. * fixed; reconnected event for replsets
  2775. * fixed; server reconnection setting discovery
  2776. * fixed; compat with non-schema path props using positional notation (#1048)
  2777. * fixed; setter/casting order (#665)
  2778. * docs; updated
  2779. 3.0.1 / 2012-08-11
  2780. ==================
  2781. * fixed; throw Error on bad validators (1044)
  2782. * fixed; typo in EmbeddedDocument#parentArray [lackac]
  2783. * fixed; repair mongoose.SchemaTypes alias
  2784. * updated; docs
  2785. 3.0.0 / 2012-08-07
  2786. ==================
  2787. * removed; old subdocument#commit method
  2788. * fixed; setting arrays of matching docs [6924cbc2]
  2789. * fixed; doc!remove event now emits in save order as save for consistency
  2790. * fixed; pre-save hooks no longer fire on subdocuments when validation fails
  2791. * added; subdoc#parent() and subdoc#parentArray() to access subdocument parent objects
  2792. * added; query#lean() helper
  2793. 3.0.0rc0 / 2012-08-01
  2794. =====================
  2795. * fixed; allow subdoc literal declarations containing "type" pathname (#993)
  2796. * fixed; unsetting a default array (#758)
  2797. * fixed; boolean $in queries (#998)
  2798. * fixed; allow use of `options` as a pathname (#529)
  2799. * fixed; `model` is again a permitted schema path name
  2800. * fixed; field selection option on subdocs (#1022)
  2801. * fixed; handle another edge case with subdoc saving (#975)
  2802. * added; emit save err on model if listening
  2803. * added; MongoDB TTL collection support (#1006)
  2804. * added; $center options support
  2805. * added; $nearSphere and $polygon support
  2806. * updated; driver version to 1.1.2
  2807. 3.0.0alpha2 / 2012-07-18
  2808. =========================
  2809. * changed; index errors are now emitted on their model and passed to an optional callback (#984)
  2810. * fixed; specifying index along with sparse/unique option no longer overwrites (#1004)
  2811. * fixed; never swallow connection errors (#618)
  2812. * fixed; creating object from model with emded object no longer overwrites defaults [achurkin] (#859)
  2813. * fixed; stop needless validation of unchanged/unselected fields (#891)
  2814. * fixed; document#equals behavior of objectids (#974)
  2815. * fixed; honor the minimize schema option (#978)
  2816. * fixed; provide helpful error msgs when reserved schema path is used (#928)
  2817. * fixed; callback to conn#disconnect is optional (#875)
  2818. * fixed; handle missing protocols in connection urls (#987)
  2819. * fixed; validate args to query#where (#969)
  2820. * fixed; saving modified/removed subdocs (#975)
  2821. * fixed; update with $pull from Mixed array (#735)
  2822. * fixed; error with null shard key value
  2823. * fixed; allow unsetting enums (#967)
  2824. * added; support for manual index creation (#984)
  2825. * added; support for disabled auto-indexing (#984)
  2826. * added; support for preserving MongooseArray#sort changes (#752)
  2827. * added; emit state change events on connection
  2828. * added; support for specifying BSON subtype in MongooseBuffer#toObject [jcrugzz]
  2829. * added; support for disabled versioning (#977)
  2830. * added; implicit "new" support for models and Schemas
  2831. 3.0.0alpha1 / 2012-06-15
  2832. =========================
  2833. * removed; doc#commit (use doc#markModified)
  2834. * removed; doc.modified getter (#950)
  2835. * removed; mongoose{connectSet,createSetConnection}. use connect,createConnection instead
  2836. * removed; query alias methods 1149804c
  2837. * removed; MongooseNumber
  2838. * changed; now creating indexes in background by default
  2839. * changed; strict mode now enabled by default (#952)
  2840. * changed; doc#modifiedPaths is now a method (#950)
  2841. * changed; getters no longer cast (#820); casting happens during set
  2842. * fixed; no need to pass updateArg to findOneAndUpdate (#931)
  2843. * fixed: utils.merge bug when merging nested non-objects. [treygriffith]
  2844. * fixed; strict:throw should produce errors in findAndModify (#963)
  2845. * fixed; findAndUpdate no longer overwrites document (#962)
  2846. * fixed; setting default DocumentArrays (#953)
  2847. * fixed; selection of _id with schema deselection (#954)
  2848. * fixed; ensure promise#error emits instanceof Error
  2849. * fixed; CursorStream: No stack overflow on any size result (#929)
  2850. * fixed; doc#remove now passes safe options
  2851. * fixed; invalid use of $set during $pop
  2852. * fixed; array#{$pop,$shift} mirror MongoDB behavior
  2853. * fixed; no longer test non-required vals in string match (#934)
  2854. * fixed; edge case with doc#inspect
  2855. * fixed; setter order (#665)
  2856. * fixed; setting invalid paths in strict mode (#916)
  2857. * fixed; handle docs without id in DocumentArray#id method (#897)
  2858. * fixed; do not save virtuals during model.update (#894)
  2859. * fixed; sub doc toObject virtuals application (#889)
  2860. * fixed; MongooseArray#pull of ObjectId (#881)
  2861. * fixed; handle passing db name with any repl set string
  2862. * fixed; default application of selected fields (#870)
  2863. * fixed; subdoc paths reported in validation errors (#725)
  2864. * fixed; incorrect reported num of affected docs in update ops (#862)
  2865. * fixed; connection assignment in Model#model (#853)
  2866. * fixed; stringifying arrays of docs (#852)
  2867. * fixed; modifying subdoc and parent array works (#842)
  2868. * fixed; passing undefined to next hook (#785)
  2869. * fixed; Query#{update,remove}() works without callbacks (#788)
  2870. * fixed; set/updating nested objects by parent pathname (#843)
  2871. * fixed; allow null in number arrays (#840)
  2872. * fixed; isNew on sub doc after insertion error (#837)
  2873. * fixed; if an insert fails, set isNew back to false [boutell]
  2874. * fixed; isSelected when only _id is selected (#730)
  2875. * fixed; setting an unset default value (#742)
  2876. * fixed; query#sort error messaging (#671)
  2877. * fixed; support for passing $options with $regex
  2878. * added; array of object literal notation in schema creates DocumentArrays
  2879. * added; gt,gte,lt,lte query support for arrays (#902)
  2880. * added; capped collection support (#938)
  2881. * added; document versioning support
  2882. * added; inclusion of deselected schema path (#786)
  2883. * added; non-atomic array#pop
  2884. * added; EmbeddedDocument constructor is now exposed in DocArray#create 7cf8beec
  2885. * added; mapReduce support (#678)
  2886. * added; support for a configurable minimize option #to{Object,JSON}(option) (#848)
  2887. * added; support for strict: `throws` [regality]
  2888. * added; support for named schema types (#795)
  2889. * added; to{Object,JSON} schema options (#805)
  2890. * added; findByIdAnd{Update,Remove}()
  2891. * added; findOneAnd{Update,Remove}()
  2892. * added; query.setOptions()
  2893. * added; instance.update() (#794)
  2894. * added; support specifying model in populate() [DanielBaulig]
  2895. * added; `lean` query option [gitfy]
  2896. * added; multi-atomic support to MongooseArray#nonAtomicPush
  2897. * added; support for $set + other $atomic ops on single array
  2898. * added; tests
  2899. * updated; driver to 1.0.2
  2900. * updated; query.sort() syntax to mirror query.select()
  2901. * updated; clearer cast error msg for array numbers
  2902. * updated; docs
  2903. * updated; doc.clone 3x faster (#950)
  2904. * updated; only create _id if necessary (#950)
  2905. 2.7.3 / 2012-08-01
  2906. ==================
  2907. * fixed; boolean $in queries (#998)
  2908. * fixed field selection option on subdocs (#1022)
  2909. 2.7.2 / 2012-07-18
  2910. ==================
  2911. * fixed; callback to conn#disconnect is optional (#875)
  2912. * fixed; handle missing protocols in connection urls (#987)
  2913. * fixed; saving modified/removed subdocs (#975)
  2914. * updated; tests
  2915. 2.7.1 / 2012-06-26
  2916. ===================
  2917. * fixed; sharding: when a document holds a null as a value of the shard key
  2918. * fixed; update() using $pull on an array of Mixed (gh-735)
  2919. * deprecated; MongooseNumber#{inc, increment, decrement} methods
  2920. * tests; now using mocha
  2921. 2.7.0 / 2012-06-14
  2922. ===================
  2923. * added; deprecation warnings to methods being removed in 3.x
  2924. 2.6.8 / 2012-06-14
  2925. ===================
  2926. * fixed; edge case when using 'options' as a path name (#961)
  2927. 2.6.7 / 2012-06-08
  2928. ===================
  2929. * fixed; ensure promise#error always emits instanceof Error
  2930. * fixed; selection of _id w/ another excluded path (#954)
  2931. * fixed; setting default DocumentArrays (#953)
  2932. 2.6.6 / 2012-06-06
  2933. ===================
  2934. * fixed; stack overflow in query stream with large result sets (#929)
  2935. * added; $gt, $gte, $lt, $lte support to arrays (#902)
  2936. * fixed; pass option `safe` along to doc#remove() calls
  2937. 2.6.5 / 2012-05-24
  2938. ===================
  2939. * fixed; do not save virtuals in Model.update (#894)
  2940. * added; missing $ prefixed query aliases (going away in 3.x) (#884) [timoxley]
  2941. * fixed; setting invalid paths in strict mode (#916)
  2942. * fixed; resetting isNew after insert failure (#837) [boutell]
  2943. 2.6.4 / 2012-05-15
  2944. ===================
  2945. * updated; backport string regex $options to 2.x
  2946. * updated; use driver 1.0.2 (performance improvements) (#914)
  2947. * fixed; calling MongooseDocumentArray#id when the doc has no _id (#897)
  2948. 2.6.3 / 2012-05-03
  2949. ===================
  2950. * fixed; repl-set connectivity issues during failover on MongoDB 2.0.1
  2951. * updated; driver to 1.0.0
  2952. * fixed; virtuals application of subdocs when using toObject({ virtuals: true }) (#889)
  2953. * fixed; MongooseArray#pull of ObjectId correctly updates the array itself (#881)
  2954. 2.6.2 / 2012-04-30
  2955. ===================
  2956. * fixed; default field application of selected fields (#870)
  2957. 2.6.1 / 2012-04-30
  2958. ===================
  2959. * fixed; connection assignment in mongoose#model (#853, #877)
  2960. * fixed; incorrect reported num of affected docs in update ops (#862)
  2961. 2.6.0 / 2012-04-19
  2962. ===================
  2963. * updated; hooks.js to 0.2.1
  2964. * fixed; issue with passing undefined to a hook callback. thanks to [chrisleishman] for reporting.
  2965. * fixed; updating/setting nested objects in strict schemas (#843) as reported by [kof]
  2966. * fixed; Query#{update,remove}() work without callbacks again (#788)
  2967. * fixed; modifying subdoc along with parent array $atomic op (#842)
  2968. 2.5.14 / 2012-04-13
  2969. ===================
  2970. * fixed; setting an unset default value (#742)
  2971. * fixed; doc.isSelected(otherpath) when only _id is selected (#730)
  2972. * updated; docs
  2973. 2.5.13 / 2012-03-22
  2974. ===================
  2975. * fixed; failing validation of unselected required paths (#730,#713)
  2976. * fixed; emitting connection error when only one listener (#759)
  2977. * fixed; MongooseArray#splice was not returning values (#784) [chrisleishman]
  2978. 2.5.12 / 2012-03-21
  2979. ===================
  2980. * fixed; honor the `safe` option in all ensureIndex calls
  2981. * updated; node-mongodb-native driver to 0.9.9-7
  2982. 2.5.11 / 2012-03-15
  2983. ===================
  2984. * added; introspection for getters/setters (#745)
  2985. * updated; node-mongodb-driver to 0.9.9-5
  2986. * added; tailable method to Query (#769) [holic]
  2987. * fixed; Number min/max validation of null (#764) [btamas]
  2988. * added; more flexible user/password connection options (#738) [KarneAsada]
  2989. 2.5.10 / 2012-03-06
  2990. ===================
  2991. * updated; node-mongodb-native driver to 0.9.9-4
  2992. * added; Query#comment()
  2993. * fixed; allow unsetting arrays
  2994. * fixed; hooking the set method of subdocuments (#746)
  2995. * fixed; edge case in hooks
  2996. * fixed; allow $id and $ref in queries (fixes compatibility with mongoose-dbref) (#749) [richtera]
  2997. * added; default path selection to SchemaTypes
  2998. 2.5.9 / 2012-02-22
  2999. ===================
  3000. * fixed; properly cast nested atomic update operators for sub-documents
  3001. 2.5.8 / 2012-02-21
  3002. ===================
  3003. * added; post 'remove' middleware includes model that was removed (#729) [timoxley]
  3004. 2.5.7 / 2012-02-09
  3005. ===================
  3006. * fixed; RegExp validators on node >= v0.6.x
  3007. 2.5.6 / 2012-02-09
  3008. ===================
  3009. * fixed; emit errors returned from db.collection() on the connection (were being swallowed)
  3010. * added; can add multiple validators in your schema at once (#718) [diogogmt]
  3011. * fixed; strict embedded documents (#717)
  3012. * updated; docs [niemyjski]
  3013. * added; pass number of affected docs back in model.update/save
  3014. 2.5.5 / 2012-02-03
  3015. ===================
  3016. * fixed; RangeError: maximum call stack exceed error when removing docs with Number _id (#714)
  3017. 2.5.4 / 2012-02-03
  3018. ===================
  3019. * fixed; RangeError: maximum call stack exceed error (#714)
  3020. 2.5.3 / 2012-02-02
  3021. ===================
  3022. * added; doc#isSelected(path)
  3023. * added; query#equals()
  3024. * added; beta sharding support
  3025. * added; more descript error msgs (#700) [obeleh]
  3026. * added; document.modifiedPaths (#709) [ljharb]
  3027. * fixed; only functions can be added as getters/setters (#707,704) [ljharb]
  3028. 2.5.2 / 2012-01-30
  3029. ===================
  3030. * fixed; rollback -native driver to 0.9.7-3-5 (was causing timeouts and other replica set weirdness)
  3031. * deprecated; MongooseNumber (will be moved to a separate repo for 3.x)
  3032. * added; init event is emitted on schemas
  3033. 2.5.1 / 2012-01-27
  3034. ===================
  3035. * fixed; honor strict schemas in Model.update (#699)
  3036. 2.5.0 / 2012-01-26
  3037. ===================
  3038. * added; doc.toJSON calls toJSON on embedded docs when exists [jerem]
  3039. * added; populate support for refs of type Buffer (#686) [jerem]
  3040. * added; $all support for ObjectIds and Dates (#690)
  3041. * fixed; virtual setter calling on instantiation when strict: true (#682) [hunterloftis]
  3042. * fixed; doc construction triggering getters (#685)
  3043. * fixed; MongooseBuffer check in deepEquals (#688)
  3044. * fixed; range error when using Number _ids with `instance.save()` (#691)
  3045. * fixed; isNew on embedded docs edge case (#680)
  3046. * updated; driver to 0.9.8-3
  3047. * updated; expose `model()` method within static methods
  3048. 2.4.10 / 2012-01-10
  3049. ===================
  3050. * added; optional getter application in .toObject()/.toJSON() (#412)
  3051. * fixed; nested $operators in $all queries (#670)
  3052. * added; $nor support (#674)
  3053. * fixed; bug when adding nested schema (#662) [paulwe]
  3054. 2.4.9 / 2012-01-04
  3055. ===================
  3056. * updated; driver to 0.9.7-3-5 to fix Linux performance degradation on some boxes
  3057. 2.4.8 / 2011-12-22
  3058. ===================
  3059. * updated; bump -native to 0.9.7.2-5
  3060. * fixed; compatibility with date.js (#646) [chrisleishman]
  3061. * changed; undocumented schema "lax" option to "strict"
  3062. * fixed; default value population for strict schemas
  3063. * updated; the nextTick helper for small performance gain. 1bee2a2
  3064. 2.4.7 / 2011-12-16
  3065. ===================
  3066. * fixed; bug in 2.4.6 with path setting
  3067. * updated; bump -native to 0.9.7.2-1
  3068. * added; strict schema option [nw]
  3069. 2.4.6 / 2011-12-16
  3070. ===================
  3071. * fixed; conflicting mods on update bug [sirlantis]
  3072. * improved; doc.id getter performance
  3073. 2.4.5 / 2011-12-14
  3074. ===================
  3075. * fixed; bad MongooseArray behavior in 2.4.2 - 2.4.4
  3076. 2.4.4 / 2011-12-14
  3077. ===================
  3078. * fixed; MongooseArray#doAtomics throwing after sliced
  3079. 2.4.3 / 2011-12-14
  3080. ===================
  3081. * updated; system.profile schema for MongoDB 2x
  3082. 2.4.2 / 2011-12-12
  3083. ===================
  3084. * fixed; partially populating multiple children of subdocs (#639) [kenpratt]
  3085. * fixed; allow Update of numbers to null (#640) [jerem]
  3086. 2.4.1 / 2011-12-02
  3087. ===================
  3088. * added; options support for populate() queries
  3089. * updated; -native driver to 0.9.7-1.4
  3090. 2.4.0 / 2011-11-29
  3091. ===================
  3092. * added; QueryStreams (#614)
  3093. * added; debug print mode for development
  3094. * added; $within support to Array queries (#586) [ggoodale]
  3095. * added; $centerSphere query support
  3096. * fixed; $within support
  3097. * added; $unset is now used when setting a path to undefined (#519)
  3098. * added; query#batchSize support
  3099. * updated; docs
  3100. * updated; -native driver to 0.9.7-1.3 (provides Windows support)
  3101. 2.3.13 / 2011-11-15
  3102. ===================
  3103. * fixed; required validation for Refs (#612) [ded]
  3104. * added; $nearSphere support for Arrays (#610)
  3105. 2.3.12 / 2011-11-09
  3106. ===================
  3107. * fixed; regression, objects passed to Model.update should not be changed (#605)
  3108. * fixed; regression, empty Model.update should not be executed
  3109. 2.3.11 / 2011-11-08
  3110. ===================
  3111. * fixed; using $elemMatch on arrays of Mixed types (#591)
  3112. * fixed; allow using $regex when querying Arrays (#599)
  3113. * fixed; calling Model.update with no atomic keys (#602)
  3114. 2.3.10 / 2011-11-05
  3115. ===================
  3116. * fixed; model.update casting for nested paths works (#542)
  3117. 2.3.9 / 2011-11-04
  3118. ==================
  3119. * fixed; deepEquals check for MongooseArray returned false
  3120. * fixed; reset modified flags of embedded docs after save [gitfy]
  3121. * fixed; setting embedded doc with identical values no longer marks modified [gitfy]
  3122. * updated; -native driver to 0.9.6.23 [mlazarov]
  3123. * fixed; Model.update casting (#542, #545, #479)
  3124. * fixed; populated refs no longer fail required validators (#577)
  3125. * fixed; populating refs of objects with custom ids works
  3126. * fixed; $pop & $unset work with Model.update (#574)
  3127. * added; more helpful debugging message for Schema#add (#578)
  3128. * fixed; accessing .id when no _id exists now returns null (#590)
  3129. 2.3.8 / 2011-10-26
  3130. ==================
  3131. * added; callback to query#findOne is now optional (#581)
  3132. 2.3.7 / 2011-10-24
  3133. ==================
  3134. * fixed; wrapped save/remove callbacks in nextTick to mitigate -native swallowing thrown errors
  3135. 2.3.6 / 2011-10-21
  3136. ==================
  3137. * fixed; exclusion of embedded doc _id from query results (#541)
  3138. 2.3.5 / 2011-10-19
  3139. ==================
  3140. * fixed; calling queries without passing a callback works (#569)
  3141. * fixed; populate() works with String and Number _ids too (#568)
  3142. 2.3.4 / 2011-10-18
  3143. ==================
  3144. * added; Model.create now accepts an array as a first arg
  3145. * fixed; calling toObject on a DocumentArray with nulls no longer throws
  3146. * fixed; calling inspect on a DocumentArray with nulls no longer throws
  3147. * added; MongooseArray#unshift support
  3148. * fixed; save hooks now fire on embedded documents [gitfy] (#456)
  3149. * updated; -native driver to 0.9.6-22
  3150. * fixed; correctly pass $addToSet op instead of $push
  3151. * fixed; $addToSet properly detects dates
  3152. * fixed; $addToSet with multiple items works
  3153. * updated; better node 0.6 Buffer support
  3154. 2.3.3 / 2011-10-12
  3155. ==================
  3156. * fixed; population conditions in multi-query settings [vedmalex] (#563)
  3157. * fixed; now compatible with Node v0.5.x
  3158. 2.3.2 / 2011-10-11
  3159. ==================
  3160. * fixed; population of null subdoc properties no longer hangs (#561)
  3161. 2.3.1 / 2011-10-10
  3162. ==================
  3163. * added; support for Query filters to populate() [eneko]
  3164. * fixed; querying with number no longer crashes mongodb (#555) [jlbyrey]
  3165. * updated; version of -native driver to 0.9.6-21
  3166. * fixed; prevent query callbacks that throw errors from corrupting -native connection state
  3167. 2.3.0 / 2011-10-04
  3168. ==================
  3169. * fixed; nulls as default values for Boolean now works as expected
  3170. * updated; version of -native driver to 0.9.6-20
  3171. 2.2.4 / 2011-10-03
  3172. ==================
  3173. * fixed; populate() works when returned array contains undefined/nulls
  3174. 2.2.3 / 2011-09-29
  3175. ==================
  3176. * updated; version of -native driver to 0.9.6-19
  3177. 2.2.2 / 2011-09-28
  3178. ==================
  3179. * added; $regex support to String [davidandrewcope]
  3180. * added; support for other contexts like repl etc (#535)
  3181. * fixed; clear modified state properly after saving
  3182. * added; $addToSet support to Array
  3183. 2.2.1 / 2011-09-22
  3184. ==================
  3185. * more descript error when casting undefined to string
  3186. * updated; version of -native driver to 0.9.6-18
  3187. 2.2.0 / 2011-09-22
  3188. ==================
  3189. * fixed; maxListeners warning on schemas with many arrays (#530)
  3190. * changed; return / apply defaults based on fields selected in query (#423)
  3191. * fixed; correctly detect Mixed types within schema arrays (#532)
  3192. 2.1.4 / 2011-09-20
  3193. ==================
  3194. * fixed; new private methods that stomped on users code
  3195. * changed; finished removing old "compat" support which did nothing
  3196. 2.1.3 / 2011-09-16
  3197. ==================
  3198. * updated; version of -native driver to 0.9.6-15
  3199. * added; emit `error` on connection when open fails [edwardhotchkiss]
  3200. * added; index support to Buffers (thanks justmoon for helping track this down)
  3201. * fixed; passing collection name via schema in conn.model() now works (thanks vedmalex for reporting)
  3202. 2.1.2 / 2011-09-07
  3203. ==================
  3204. * fixed; Query#find with no args no longer throws
  3205. 2.1.1 / 2011-09-07
  3206. ==================
  3207. * added; support Model.count(fn)
  3208. * fixed; compatibility with node >=0.4.0 < 0.4.3
  3209. * added; pass model.options.safe through with .save() so w:2, wtimeout:5000 options work [andrewjstone]
  3210. * added; support for $type queries
  3211. * added; support for Query#or
  3212. * added; more tests
  3213. * optimized populate queries
  3214. 2.1.0 / 2011-09-01
  3215. ==================
  3216. * changed; document#validate is a public method
  3217. * fixed; setting number to same value no longer marks modified (#476) [gitfy]
  3218. * fixed; Buffers shouldn't have default vals
  3219. * added; allow specifying collection name in schema (#470) [ixti]
  3220. * fixed; reset modified paths and atomics after saved (#459)
  3221. * fixed; set isNew on embedded docs to false after save
  3222. * fixed; use self to ensure proper scope of options in doOpenSet (#483) [andrewjstone]
  3223. 2.0.4 / 2011-08-29
  3224. ==================
  3225. * Fixed; Only send the depopulated ObjectId instead of the entire doc on save (DBRefs)
  3226. * Fixed; Properly cast nested array values in Model.update (the data was stored in Mongo incorrectly but recast on document fetch was "fixing" it)
  3227. 2.0.3 / 2011-08-28
  3228. ==================
  3229. * Fixed; manipulating a populated array no longer causes infinite loop in BSON serializer during save (#477)
  3230. * Fixed; populating an empty array no longer hangs foreeeeeeeever (#481)
  3231. 2.0.2 / 2011-08-25
  3232. ==================
  3233. * Fixed; Maintain query option key order (fixes 'bad hint' error from compound query hints)
  3234. 2.0.1 / 2011-08-25
  3235. ==================
  3236. * Fixed; do not over-write the doc when no valide props exist in Model.update (#473)
  3237. 2.0.0 / 2011-08-24
  3238. ===================
  3239. * Added; support for Buffers [justmoon]
  3240. * Changed; improved error handling [maelstrom]
  3241. * Removed: unused utils.erase
  3242. * Fixed; support for passing other context object into Schemas (#234) [Sija]
  3243. * Fixed; getters are no longer circular refs to themselves (#366)
  3244. * Removed; unused compat.js
  3245. * Fixed; getter/setter scopes are set properly
  3246. * Changed; made several private properties more obvious by prefixing _
  3247. * Added; DBRef support [guille]
  3248. * Changed; removed support for multiple collection names per model
  3249. * Fixed; no longer applying setters when document returned from db
  3250. * Changed; default auto_reconnect to true
  3251. * Changed; Query#bind no longer clones the query
  3252. * Fixed; Model.update now accepts $pull, $inc and friends (#404)
  3253. * Added; virtual type option support [nw]
  3254. 1.8.4 / 2011-08-21
  3255. ===================
  3256. * Fixed; validation bug when instantiated with non-schema properties (#464) [jmreidy]
  3257. 1.8.3 / 2011-08-19
  3258. ===================
  3259. * Fixed; regression in connection#open [jshaw86]
  3260. 1.8.2 / 2011-08-17
  3261. ===================
  3262. * fixed; reset connection.readyState after failure [tomseago]
  3263. * fixed; can now query positionally for non-embedded docs (arrays of numbers/strings etc)
  3264. * fixed; embedded document query casting
  3265. * added; support for passing options to node-mongo-native db, server, and replsetserver [tomseago]
  3266. 1.8.1 / 2011-08-10
  3267. ===================
  3268. * fixed; ObjectIds were always marked modified
  3269. * fixed; can now query using document instances
  3270. * fixed; can now query/update using documents with subdocs
  3271. 1.8.0 / 2011-08-04
  3272. ===================
  3273. * fixed; can now use $all with String and Number
  3274. * fixed; can query subdoc array with $ne: null
  3275. * fixed; instance.subdocs#id now works with custom _ids
  3276. * fixed; do not apply setters when doc returned from db (change in bad behavior)
  3277. 1.7.4 / 2011-07-25
  3278. ===================
  3279. * fixed; sparse now a valid seperate schema option
  3280. * fixed; now catching cast errors in queries
  3281. * fixed; calling new Schema with object created in vm.runInNewContext now works (#384) [Sija]
  3282. * fixed; String enum was disallowing null
  3283. * fixed; Find by nested document _id now works (#389)
  3284. 1.7.3 / 2011-07-16
  3285. ===================
  3286. * fixed; MongooseArray#indexOf now works with ObjectIds
  3287. * fixed; validation scope now set properly (#418)
  3288. * fixed; added missing colors dependency (#398)
  3289. 1.7.2 / 2011-07-13
  3290. ===================
  3291. * changed; node-mongodb-native driver to v0.9.6.7
  3292. 1.7.1 / 2011-07-12
  3293. ===================
  3294. * changed; roll back node-mongodb-native driver to v0.9.6.4
  3295. 1.7.0 / 2011-07-12
  3296. ===================
  3297. * fixed; collection name misspelling [mathrawka]
  3298. * fixed; 2nd param is required for ReplSetServers [kevinmarvin]
  3299. * fixed; MongooseArray behaves properly with Object.keys
  3300. * changed; node-mongodb-native driver to v0.9.6.6
  3301. * fixed/changed; Mongodb segfault when passed invalid ObjectId (#407)
  3302. - This means invalid data passed to the ObjectId constructor will now error
  3303. 1.6.0 / 2011-07-07
  3304. ===================
  3305. * changed; .save() errors are now emitted on the instances db instead of the instance 9782463fc
  3306. * fixed; errors occurring when creating indexes now properly emit on db
  3307. * added; $maxDistance support to MongooseArrays
  3308. * fixed; RegExps now work with $all
  3309. * changed; node-mongodb-native driver to v0.9.6.4
  3310. * fixed; model names are now accessible via .modelName
  3311. * added; Query#slaveOk support
  3312. 1.5.0 / 2011-06-27
  3313. ===================
  3314. * changed; saving without a callback no longer ignores the error (@bnoguchi)
  3315. * changed; hook-js version bump to 0.1.9
  3316. * changed; node-mongodb-native version bumped to 0.9.6.1 - When .remove() doesn't
  3317. return an error, null is no longer passed.
  3318. * fixed; two memory leaks (@justmoon)
  3319. * added; sparse index support
  3320. * added; more ObjectId conditionals (gt, lt, gte, lte) (@phillyqueso)
  3321. * added; options are now passed in model#remote (@JerryLuke)
  3322. 1.4.0 / 2011-06-10
  3323. ===================
  3324. * bumped hooks-js dependency (fixes issue passing null as first arg to next())
  3325. * fixed; document#inspect now works properly with nested docs
  3326. * fixed; 'set' now works as a schema attribute (GH-365)
  3327. * fixed; _id is now set properly within pre-init hooks (GH-289)
  3328. * added; Query#distinct / Model#distinct support (GH-155)
  3329. * fixed; embedded docs now can use instance methods (GH-249)
  3330. * fixed; can now overwrite strings conflicting with schema type
  3331. 1.3.7 / 2011-06-03
  3332. ===================
  3333. * added MongooseArray#splice support
  3334. * fixed; 'path' is now a valid Schema pathname
  3335. * improved hooks (utilizing https://github.com/bnoguchi/hooks-js)
  3336. * fixed; MongooseArray#$shift now works (never did)
  3337. * fixed; Document.modified no longer throws
  3338. * fixed; modifying subdoc property sets modified paths for subdoc and parent doc
  3339. * fixed; marking subdoc path as modified properly persists the value to the db
  3340. * fixed; RexExps can again be saved ( #357 )
  3341. 1.3.6 / 2011-05-18
  3342. ===================
  3343. * fixed; corrected casting for queries against array types
  3344. * added; Document#set now accepts Document instances
  3345. 1.3.5 / 2011-05-17
  3346. ===================
  3347. * fixed; $ne queries work properly with single vals
  3348. * added; #inspect() methods to improve console.log output
  3349. 1.3.4 / 2011-05-17
  3350. ===================
  3351. * fixed; find by Date works as expected (#336)
  3352. * added; geospatial 2d index support
  3353. * added; support for $near (#309)
  3354. * updated; node-mongodb-native driver
  3355. * fixed; updating numbers work (#342)
  3356. * added; better error msg when try to remove an embedded doc without an _id (#307)
  3357. * added; support for 'on-the-fly' schemas (#227)
  3358. * changed; virtual id getters can now be skipped
  3359. * fixed; .index() called on subdoc schema now works as expected
  3360. * fixed; db.setProfile() now buffers until the db is open (#340)
  3361. 1.3.3 / 2011-04-27
  3362. ===================
  3363. * fixed; corrected query casting on nested mixed types
  3364. 1.3.2 / 2011-04-27
  3365. ===================
  3366. * fixed; query hints now retain key order
  3367. 1.3.1 / 2011-04-27
  3368. ===================
  3369. * fixed; setting a property on an embedded array no longer overwrites entire array (GH-310)
  3370. * fixed; setting nested properties works when sibling prop is named "type"
  3371. * fixed; isModified is now much finer grained when .set() is used (GH-323)
  3372. * fixed; mongoose.model() and connection.model() now return the Model (GH-308, GH-305)
  3373. * fixed; can now use $gt, $lt, $gte, $lte with String schema types (GH-317)
  3374. * fixed; .lowercase() -> .toLowerCase() in pluralize()
  3375. * fixed; updating an embedded document by index works (GH-334)
  3376. * changed; .save() now passes the instance to the callback (GH-294, GH-264)
  3377. * added; can now query system.profile and system.indexes collections
  3378. * added; db.model('system.profile') is now included as a default Schema
  3379. * added; db.setProfiling(level, ms, callback)
  3380. * added; Query#hint() support
  3381. * added; more tests
  3382. * updated node-mongodb-native to 0.9.3
  3383. 1.3.0 / 2011-04-19
  3384. ===================
  3385. * changed; save() callbacks now fire only once on failed validation
  3386. * changed; Errors returned from save() callbacks now instances of ValidationError
  3387. * fixed; MongooseArray#indexOf now works properly
  3388. 1.2.0 / 2011-04-11
  3389. ===================
  3390. * changed; MongooseNumber now casts empty string to null
  3391. 1.1.25 / 2011-04-08
  3392. ===================
  3393. * fixed; post init now fires at proper time
  3394. 1.1.24 / 2011-04-03
  3395. ===================
  3396. * fixed; pushing an array onto an Array works on existing docs
  3397. 1.1.23 / 2011-04-01
  3398. ===================
  3399. * Added Model#model
  3400. 1.1.22 / 2011-03-31
  3401. ===================
  3402. * Fixed; $in queries on mixed types now work
  3403. 1.1.21 / 2011-03-31
  3404. ===================
  3405. * Fixed; setting object root to null/undefined works
  3406. 1.1.20 / 2011-03-31
  3407. ===================
  3408. * Fixed; setting multiple props on null field works
  3409. 1.1.19 / 2011-03-31
  3410. ===================
  3411. * Fixed; no longer using $set on paths to an unexisting fields
  3412. 1.1.18 / 2011-03-30
  3413. ===================
  3414. * Fixed; non-mixed type object setters work after initd from null
  3415. 1.1.17 / 2011-03-30
  3416. ===================
  3417. * Fixed; nested object property access works when root initd with null value
  3418. 1.1.16 / 2011-03-28
  3419. ===================
  3420. * Fixed; empty arrays are now saved
  3421. 1.1.15 / 2011-03-28
  3422. ===================
  3423. * Fixed; `null` and `undefined` are set atomically.
  3424. 1.1.14 / 2011-03-28
  3425. ===================
  3426. * Changed; more forgiving date casting, accepting '' as null.
  3427. 1.1.13 / 2011-03-26
  3428. ===================
  3429. * Fixed setting values as `undefined`.
  3430. 1.1.12 / 2011-03-26
  3431. ===================
  3432. * Fixed; nested objects now convert to JSON properly
  3433. * Fixed; setting nested objects directly now works
  3434. * Update node-mongodb-native
  3435. 1.1.11 / 2011-03-25
  3436. ===================
  3437. * Fixed for use of `type` as a key.
  3438. 1.1.10 / 2011-03-23
  3439. ===================
  3440. * Changed; Make sure to only ensure indexes while connected
  3441. 1.1.9 / 2011-03-2
  3442. ==================
  3443. * Fixed; Mixed can now default to empty arrays
  3444. * Fixed; keys by the name 'type' are now valid
  3445. * Fixed; null values retrieved from the database are hydrated as null values.
  3446. * Fixed repeated atomic operations when saving a same document twice.
  3447. 1.1.8 / 2011-03-23
  3448. ==================
  3449. * Fixed 'id' overriding. [bnoguchi]
  3450. 1.1.7 / 2011-03-22
  3451. ==================
  3452. * Fixed RegExp query casting when querying against an Array of Strings [bnoguchi]
  3453. * Fixed getters/setters for nested virtualsl. [bnoguchi]
  3454. 1.1.6 / 2011-03-22
  3455. ==================
  3456. * Only doValidate when path exists in Schema [aheckmann]
  3457. * Allow function defaults for Array types [aheckmann]
  3458. * Fix validation hang [aheckmann]
  3459. * Fix setting of isRequired of SchemaType [aheckmann]
  3460. * Fix SchemaType#required(false) filter [aheckmann]
  3461. * More backwards compatibility [aheckmann]
  3462. * More tests [aheckmann]
  3463. 1.1.5 / 2011-03-14
  3464. ==================
  3465. * Added support for `uri, db, fn` and `uri, fn` signatures for replica sets.
  3466. * Improved/extended replica set tests.
  3467. 1.1.4 / 2011-03-09
  3468. ==================
  3469. * Fixed; running an empty Query doesn't throw. [aheckmann]
  3470. * Changed; Promise#addBack returns promise. [aheckmann]
  3471. * Added streaming cursor support. [aheckmann]
  3472. * Changed; Query#update defaults to use$SetOnSave now. [brian]
  3473. * Added more docs.
  3474. 1.1.3 / 2011-03-04
  3475. ==================
  3476. * Added Promise#resolve [aheckmann]
  3477. * Fixed backward compatibility with nulls [aheckmann]
  3478. * Changed; Query#{run,exec} return promises [aheckmann]
  3479. 1.1.2 / 2011-03-03
  3480. ==================
  3481. * Restored Query#exec and added notion of default operation [brian]
  3482. * Fixed ValidatorError messages [brian]
  3483. 1.1.1 / 2011-03-01
  3484. ==================
  3485. * Added SchemaType String `lowercase`, `uppercase`, `trim`.
  3486. * Public exports (`Model`, `Document`) and tests.
  3487. * Added ObjectId casting support for `Document`s.
  3488. 1.1.0 / 2011-02-25
  3489. ==================
  3490. * Added support for replica sets.
  3491. 1.0.16 / 2011-02-18
  3492. ===================
  3493. * Added $nin as another whitelisted $conditional for SchemaArray [brian]
  3494. * Changed #with to #where [brian]
  3495. * Added ability to use $in conditional with Array types [brian]
  3496. 1.0.15 / 2011-02-18
  3497. ===================
  3498. * Added `id` virtual getter for documents to easily access the hexString of
  3499. the `_id`.
  3500. 1.0.14 / 2011-02-17
  3501. ===================
  3502. * Fix for arrays within subdocuments [brian]
  3503. 1.0.13 / 2011-02-16
  3504. ===================
  3505. * Fixed embedded documents saving.
  3506. 1.0.12 / 2011-02-14
  3507. ===================
  3508. * Minor refactorings [brian]
  3509. 1.0.11 / 2011-02-14
  3510. ===================
  3511. * Query refactor and $ne, $slice, $or, $size, $elemMatch, $nin, $exists support [brian]
  3512. * Named scopes sugar [brian]
  3513. 1.0.10 / 2011-02-11
  3514. ===================
  3515. * Updated node-mongodb-native driver [thanks John Allen]
  3516. 1.0.9 / 2011-02-09
  3517. ==================
  3518. * Fixed single member arrays as defaults [brian]
  3519. 1.0.8 / 2011-02-09
  3520. ==================
  3521. * Fixed for collection-level buffering of commands [gitfy]
  3522. * Fixed `Document#toJSON` [dalejefferson]
  3523. * Fixed `Connection` authentication [robrighter]
  3524. * Fixed clash of accessors in getters/setters [eirikurn]
  3525. * Improved `Model#save` promise handling
  3526. 1.0.7 / 2011-02-05
  3527. ==================
  3528. * Fixed memory leak warnings for test suite on 0.3
  3529. * Fixed querying documents that have an array that contain at least one
  3530. specified member. [brian]
  3531. * Fixed default value for Array types (fixes GH-210). [brian]
  3532. * Fixed example code.
  3533. 1.0.6 / 2011-02-03
  3534. ==================
  3535. * Fixed `post` middleware
  3536. * Fixed; it's now possible to instantiate a model even when one of the paths maps
  3537. to an undefined value [brian]
  3538. 1.0.5 / 2011-02-02
  3539. ==================
  3540. * Fixed; combo $push and $pushAll auto-converts into a $pushAll [brian]
  3541. * Fixed; combo $pull and $pullAll auto-converts to a single $pullAll [brian]
  3542. * Fixed; $pullAll now removes said members from array before save (so it acts just
  3543. like pushAll) [brian]
  3544. * Fixed; multiple $pulls and $pushes become a single $pullAll and $pushAll.
  3545. Moreover, $pull now modifies the array before save to reflect the immediate
  3546. change [brian]
  3547. * Added tests for nested shortcut getters [brian]
  3548. * Added tests that show that Schemas with nested Arrays don't apply defaults
  3549. [brian]
  3550. 1.0.4 / 2011-02-02
  3551. ==================
  3552. * Added MongooseNumber#toString
  3553. * Added MongooseNumber unit tests
  3554. 1.0.3 / 2011-02-02
  3555. ==================
  3556. * Make sure safe mode works with Model#save
  3557. * Changed Schema options: safe mode is now the default
  3558. * Updated node-mongodb-native to HEAD
  3559. 1.0.2 / 2011-02-02
  3560. ==================
  3561. * Added a Model.create shortcut for creating documents. [brian]
  3562. * Fixed; we can now instantiate models with hashes that map to at least one
  3563. null value. [brian]
  3564. * Fixed Schema with more than 2 nested levels. [brian]
  3565. 1.0.1 / 2011-02-02
  3566. ==================
  3567. * Improved `MongooseNumber`, works almost like the native except for `typeof`
  3568. not being `'number'`.