-
Notifications
You must be signed in to change notification settings - Fork 139
Open
Description
Description
Environment
- js-data version: latest
- node or browser version: any
- operating system: any
Steps to reproduce
try adding records to store which have hasOne
relation and there are already related records in store - related records won't be linked to newly added records
Cause
The implementation of findExistingLinksFor
is incorrect for hasOne
relation:
js-data/src/Relation/HasOne.js
Line 5 in c068c4b
findExistingLinksFor (relatedMapper, record) { |
where it's being called like this:
Line 146 in 65a2a78
relatedData = this.findExistingLinksFor(record) |
so, as it's seen - first argument should be a record, and second argument even never passed
to compare, this is the impl of this method for hasMany
:
js-data/src/Relation/HasMany.js
Line 43 in 17020d8
findExistingLinksFor (record) { |
Metadata
Metadata
Assignees
Labels
No labels