-
Add instance context to custom validators. (thanks johngeorgewright)
exports.instanceValidation = function (value, opt, callback) { if (this.id < 50) { callback(true); } else { callback(this.p(opt.property).includes(value)); } };
-
Update dependencies (thanks brysgo)
- redis 2.4.2
- (dev) nodeunit 0.9.1
- BREAKS BACKWARDS COMPATIBILITY! (but only slightly and shouldn't really be an issue for most uses)
- Fix for date parsing - only affects ISO date strings of format that has ' +HH:MM' or ' -HH:MM' at the end) and only on machines that are not set UTC (which servers usually are)
- Update async & nodeunit dependencies
- Add save option skip_validation_and_unique_indexes (thanks RoxasShadow)
- Bug fixes (thanks exortech)
- Update dependencies
- Add endpoints option to find() (thanks to interruptz)
- Add min>max options to find() that trigger descending search (thanks to interruptz)
- Add return of the instance on shortform functions
- Remove checking and setting meta.version on every model init
- Bug fixes
- Add findAndLoad as a convenience method
- Fix a problem with getAll if different idGenerators were used
- Fix uniques to now be completely case-insensitive
- setClient/getClient now issue warnings on unconnected clients
- Bug fixes
- Support for common variants on bool/string/integer/timestamp
- Bug fixes
- BREAKS BACKWARDS COMPATIBILITY! change relation names for clearer handling ("child" is now "default", "xyzParent" is now "xyzForeign")
- Added error handler to link/unlink
- Bug fixes
- add .sort()
- Fix unique handling bugs
- BREAKS BACKWARDS COMPATIBILTY! change validate() to be async only (validations all need to be async now), also changed validation usage syntax (see docs)
- add nohm.connect() connect middleware that delivers browser validation js
- Fix empty strings being locked on unique properties
- Fix uniques to be case insensitive
- unique values are now case insensitive when validating or searching
- now compatible with node v0.6.3
- now uses nodeunit v0.6.4
- add Nohm.factory(modelName, [id, callback])
- update redis dependency to 0.7.1
- bug fixes
- changed id generation to unique strings by default (BREAKS BACKWARDS COMPATIBILTY)
- added ability to choose from different id generation mechanisms (for example incremental or custom functions)
- added short forms of functions where you don't need to create a new instance first to save/load/find/remove
- changed
this
in callbacks to be the instance you manipulated/loaded - bug fixes
- "value" in model properties renamed to "defaultValue"
- "has()" renamed to "belongsTo()"
- bug fixes
- documentation
- added instance.exists(id, callback)
- added Nohm.setPrefix(prefix) to set the global redis prefix (default "nohm")
- added Nohm.setClient(client) & Nohm.getClient() to set/get the global redis client (no default!)
- removed instance.partialSave()
- removed admin app (now in https://github.com/maritz/nohm-admin)
- bug fixes and code improvements
- refactored a lot of the code
- merged admin branch (this adds an optional and very basic admin web interface)
- a lot of fixes for find and indexes
- three small changes
- added numLinks()
- lots of bugfixes and some semi-internal changes
- a few bugfixes in uniques, find() and load()
- expose redis via nohm.redis
- all basic functionality included