- #324 - Added
applyDefaultsOnInject
option, which defaults tofalse
- #364 - Added
usePendingFind
andusePendingFindAll
options, which both default totrue
- #316 - Merge/Replace inject does not reevaluate computed properties
- #324 - Inconsistent defaultValues behavior.
- #364 - Resource.pendingQueries on server causes unexpected behaviour
- #373 - DS.clear() extremely slow
- #407 - DSUtils.copy blacklist applies to nested fields
- #273 - DS.save, use id from incoming arguments by @zuzusik
- #284 - (Partial) Support for temporary items
- #290 - Add save() option to always include specified properties when using changesOnly by @OzzieOrca
- #305 - Add support for multiple parents by @tfoxy
- #251 - The 'localKey' of the 'belongsTo' relation ship is not set.
- #262 -
defaultValues
are shallow copied - #272 - lastSaved is broken when API doesn't return saved object in response
- #304 - Relations ignore useClass on the server
- #258 - CSP violations due to use of new Function()
- #239 - loadRelations assumes cacheResponse and linkRelations options are true
- #259, #260 - Reverting undefined keys by @davincho
- #211 - Add case insensitive filtering in query syntax
- #205 - DS#revert should ignore omitted fields
- #243 - DS#commit
- #245 - Closes #205 by @internalfx
- #248 - Fix
belongsTo
relation with zero value by @Pencroff
- Dropped Grunt
- #223 - Zero value Id in relations fixed in #237 by @Pencroff
- #234 - findAll should query adapter if previous query is expired.
- #235 - Support maxAge in find/findAll requests by @antoinebrault
- #236 - actions defined in defineResource are shared across definitions
- #187 - No way to hook into error events globally
- #201 - Feature request: hook into loadRelations
- #220 - Optionally disable injection of nested relations
- #231 - Added hasMany relations linking using "foreignKeys" by @treyenelson
- #229 - DS.change is emitted on an instance multiple times after only 1 modification
- #232 - Adapter default basepath is taken instead of definition basepath when using an action.
- #179 - Implemented a feature like Sequelize Scopes
- #201 - Feature request: hook into loadRelations
- #217 - Add afterFind, afterFindAll, and afterLoadRelations hooks
- #203 - createInstance/compute don't know about computed properties as property accessors
- #215 - Javascript error when trying to merge model with null value for relation
- #216 - Update remove circular to support File objects
- #218 - linkRelations (like cacheResponse) should have defaulted to false on the server
- #204 - Choose official code style for project
- Switched unnecessary arrow functions back to regular functions to improve performance
- Updated CONTRIBUTING.md
- #186 - Add relation setters for convenience
- #191 - Add ability to disable change detection
- #192 - Add ability to configure computed property as a property accessor
- #190 - computed properties false positive minified code warning
- Removed some asinine optimizations
- #177 - Fix Events.off
- #176 -
localKey
,localKeys
andforeignKey
don't support nested fields.
- #173 - Added
DS#revert(resourceName, id)
Thanks @internalfx
- Added
DS#clear()
, which is a method only available on a store, and will callejectAll
on all of the store's resources
Stable Version 2.0.0
- Tweak to custom relation getters
- Enhanced relation getters and better localKeys support
- Moved the
getEndpoint
method to the http adapter
- #167 - DS#refreshAll
- #168 - DS#inject - replace instead of merge.
onConflict: 'replace'
will replace existing items instead of merging into them.
- Fix so
DS#loadRelations
can load all relations
- #161 - By default, computed properties are no longer sent to adapters. You can also configure other properties that shouldn't be sent.
- #162 - Return query metadata as second parameter from a promise.
- #165 - global leak
- #160 - Add "DS.change" events, fired on Resources and instances
- #158 - Data store should consume resource definition methods internally (might not be breaking)
- #157 - DSEject not available on instances
- #156 - Thoroughly annotate all source code to encourage contribution
- #150 - Debug output,
debug
now defaults tofalse
- #145 - A little AOP, add a
.before
to all methods, allowing per-method argument customization
- #54 - feat: Call the inject and eject lifecycle hooks regardless of if the notify option is enabled
- #131 - array of IDs based hasMany relations
- #132 - Allow resources to extend other resources
- #133 - Allow filtering by nested fields
- #135 - JSData caching inconsistent behaviour when ejecting items
- #138 - Collection class
- #139 - Option to specify default values of new resource instances.
- #127 - Memory leak in DS.changes
- #134 - All resources get all methods defined on any resource
- #142 - Allow omitting options in getEndpoint
- #129 - Add interceptors to actions
Updated a dependency for better umd amd/r.js support
- #107 - Switch to property accessors (getter/setter) for relations links. (Relation links are no longer enumerable)
- #121 - Remove bundled Promise code (The developer must now ensure an ES6-style Promise constructor is available)
- #122 - Remove coupling with js-data-schema (You can still use js-data-schema, js-data just doesn't know anything about js-data-schema anymore)
- Computed properties now support nested fields (both the computed field and the fields it depends on) e.g.
computed: { 'name.fullName': ['name.first', 'name.last', function (first, last) { return first + ' ' + last; } }
- #117 - .find skips the object in the store
- #118 - DS#find() returns items cached with DS#inject() - Thanks @mightyguava!
createInstance
will now initialize computed properties (but they won't be updated until the item is injected into the store, or unless you useInstance#set(key, value)
to mutate the instance)
- #115 - removeCircular bug
- #106 - Add pathname option to actions
- #114 - Add support to actions for having item ids in the path
- #106 - loadRelations: check params.where instead when allowSimpleWhere is disabled - Thanks @maninga!
- #104 - DS.schemator is undefined when using browserify
- #101 - Reject instead of throw, as throw is messy in the console
- #97 - Don't link relations where localField is undefined
- #95 - actions should use defaultAdapter of the resource
- #91 - Wrong second argument passed to afterCreateInstance
- #84 - DS.Inject performance issues when reloading data (
DSUtils.copy
was attempting to copy relations)
- #83 - Change detection incorrectly handles cycles in the object
- #81 - Sometimes
inject
with nested relations causes an infinite loop
- Added
.npmignore
for a slimmer npm package
- #76 - Saving relation fields with changesOnly=true
- #80 - save + changesOnly + nested relations + no actual changes results in an error
- Upgraded dependencies
- Extracted BinaryHeap class to its own npm module
- #75 -
DSUtils.removeCircular
is removing more stuff than it should
- Fixed loading of the optional js-data-schema
- Re-wrote a good amount of the code to use ES6. Now using Babel.js to transpile back to ES5.
- #72 - bug: items injected via a relationship fail to fire notifications (fixed more cases of this happening)
- #35 - beforeInject not called on relationships
- #72 - bug: items injected via a relationship fail to fire notifications
- Now using
DSUtils.copy
when saving "original" attributes so changes can be computed properly
- #66 - "saved" and "lastSaved" method seems to be a misnomer
- #69 - Using resource base class w/additional properties has some side effects
- #70 - "lastSaved" timestamp changes too often
- Removed use of
DSUtils.copy
in the event hooks. This should increase performance quite a bit.
- #17 - feat: Load relations based on local field name
- #62 - getAdapter when called from a Resource fails
- #65 - internal emit api was not updated to use Resource instead of Resource.name like the lifecycle hooks were
- Internal optimizations to shave ~2kb off the minified build
- #64 - Two possible error cases in
DS#find
- #51 - Allow resource instances to be created from a base class
- #50 - Added a
DS#is(resourceName, instance)
orResource#is(instance)
method to check if an object is an instance of a particular resource
- When items are ejected cached collection queries are now checked to see if all the cached items from that query are gone, and if so, the cache query is deleted
- #42 - deserialize and beforeInject are called from the parent relation when loadRelations is used
- Added a
getResource(resourceName)
method to resource definitions so adapters can grab the definitions of a resource's relations
- #46 - "actions" don't inherit basePath properly
- Allow nested keys in "orderBy" clauses, i.e.
orderBy: 'foo.bar'
- Added
get
andset
methods to the instance prototype for getter/setter manipulation of data store items. Use ofset
will trigger immediate recalculation of computed properties on the instance. Bothget
andset
support nested key names. - Added a
removeCircular
util method so cyclic objects can be saved without fuss - #43 - Added
contains
operator to the default filter
- Added missing
createInstance
calls
Stable Version 1.0.0
- Upgraded to the latest observe-js
- Updates to defining "actions"
- #30 - Issue with offset. To solve this a
useFilter
option was added, which defaults tofalse
. PreviouslyDS#filter
was used to return cachedfindAll
queries, but that had problems. Now, cached items are also tracked by the query that retrieved them, so when you make a query again you consistently get the right data.
- #6 - Allow logging to be configurable
- #29 - Add version to JSData export
- #31 - Add build for js-data-debug.js which contains lots of debugging statements and a configurable logger.
- #27 - Properly resolve parent params for generating the URL
- #26 - Added the DSCreate instance method
- #23 - DS#findAll: make a copy of options.params if it's passed in and manipulate that
- Backport js-data/js-data-angular#262
- Optimized utility functions to save several kilobytes off of minified file
- Change detection of nested properties "should" work now
- findInverseLinks, findBelongsTo, findHasOne, and findHasMany now default to true
- Backport js-data/js-data-angular#253
- Added the isectEmpty, isectNotEmpty, |isectEmpty, and |isectNotEmpty filter operators
- Fixed file size of browser dist file
- Server-side js-data now uses the Bluebird promise library
- items don't have to be in the data store to call destroy on them anymore
Removed DSUtils.deepFreeze
- All hooks now take the resource definition object as the first argument instead of just the name of the resource
- #19 - multiple orderBy does not work
- js-data/js-data-angular#227 - Supporting methods on model instances
- js-data/js-data-angular#235 - IE 8 support
- Various fixes
- js-data/js-data-angular#208 - ng-repeat $$hashKey affecting hasChanges
- js-data/js-data-angular#225 - If the server returned an empty array for a get request (valid scenario), angular-data throws an exception
- #20 - es6-promise finally polyfill
- Fixed an issue with the options defaults util function
- #10 - Add js-data-schema integration
- #15 - Add beforeCreateInstance & afterCreateInstance
- #12 - Add expiration capabilities (reapInterval, reapAction, maxAge, DS#reap)
- #9 - Make all options passed to methods also inherit from Resource defaults
- js-data/js-data-angular#195 - throw an error when you try to inject a relation but the resource for it hasn't been defined
- Added official support for NodeJS
- Refactored from
baseUrl
tobasePath
, asbaseUrl
doesn't make sense for all adapters, butbasePath
does - Made
notify
configurable globally and per-resource
- Added
beforeDestroy
andafterDestroy
toDS#destroyAll
- Added
eagerEject
option toDS#destroyAll
andDS#destroy
- js-data/js-data-angular#145 - Add "useClass" option to inject, find, findAll, create
- js-data/js-data-angular#159 - Find which items from collection have changed with lastModified
- js-data/js-data-angular#166 - Add ID Resolver
- js-data/js-data-angular#167 - Default params argument of bindAll to empty object
- js-data/js-data-angular#170 - Global callbacks
- js-data/js-data-angular#171 - "not in" query
- js-data/js-data-angular#177 - Allow promises to be returned in lifecycle hooks
- js-data/js-data-angular#156 - cached findAll pending query doesn't get removed sometimes
- js-data/js-data-angular#163 - loadRelations shouldn't try to load a relation if the id for it is missing
- js-data/js-data-angular#165 - DS.hasChanges() reports changes after loading relations
- Moved api documentation out of comments and into the GitHub wiki
- Re-organized code and shaved 5.5kb off the minified file