Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4870

You must pass an array of records to set a hasMany relationship Error

$
0
0

I just upgraded ember from v3.27.0 to v3.28.4 and ember data from 3.27.1 to 3.28.3 and some of my tests are failing with the error: You must pass an array of records to set a hasMany relationship in places that before it worked fine. For example:

                <Input::Icons::ListToggle
                  @list={{@model.campaign.optionalIcons}}
                  @value={{@model.answer.icons}}
                  @onChange={{this.changeIcons}}
                />

in this case model.answer.icons is an ember data has many relation which returns a promise. When I tried to do assign this value to another ember data model like this it fails:

this.model.answer.icons = value;

does anyone have any thoughts about how to fix this? Is this a new behavior of ember and ember data or is it a bug?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4870

Trending Articles