Skip to content

CollectionAssociation.setAttributes Mutates Existing Records #137

@bemky

Description

@bemky
const model = new Model({parents: [{id: 1, name: 'Alpha'}]})
const p1 = await model.parents.first()

p1.id >> 1
p1.name >> Alpha

model.parents.setAttributes([
    {id: 2, name: 'Bravo'},
    {id: 1, name: 'Alpha'}
])

p1.id >> 2
p1.name >> Bravo

Failing Test is in branch

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions