Closed
Description
jsData 2.9.0
Angular 1.5.3
When defining a resource, its possible to set defaultValues, as documented here: http://www.js-data.io/docs/dsdefaults#defaultvalues
This only works when calling DS.createInstance()
. Why not also apply defaults in DS.inject()
? I would expect that any method which injects, creates, etc. a new instance of a model applies the defaultValues.
Secondly, the documentation for createInstance incorrectly notes options.defaults
see https://github.com/js-data/js-data/blob/v2/src/datastore/sync_methods/index.js#L153