Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

History.md 234KB

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