You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems the adapter has trouble when dealing with hasMany relations.
Namely, I created an Array column, but got 400 as the adapter sends in an OBJECT in place of a list of items.
Then I changed the column into type object. What's my surprise when Ember refuses to load my record since hasMany should be an array, not an object?
A (subclass of DS.Model) record was pushed into the store with the value of boards
being '{objects: [object Object]}', but boards is a hasMany relationship so the value
must be an array.
The text was updated successfully, but these errors were encountered:
I had to override the serializeHasMany method and change line 26 to 'objectId' : child.get( 'id' ) as opposed to 'objectId' : child.attr( 'id' ) to get your error in the first place.
It seems the adapter has trouble when dealing with hasMany relations.
Namely, I created an
Array
column, but got 400 as the adapter sends in an OBJECT in place of a list of items.Then I changed the column into type
object
. What's my surprise when Ember refuses to load my record sincehasMany
should be an array, not an object?The text was updated successfully, but these errors were encountered: