8000 Inconsistent defaultValues behavior. · Issue #324 · js-data/js-data · GitHub
[go: up one dir, main page]

Skip to content
Inconsistent defaultValues behavior.  #324
Closed
@facultymatt

Description

@facultymatt

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0