Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response data.map() doesn't seem to exist #390

Open
silvenon opened this issue Jul 1, 2014 · 7 comments
Open

Response data.map() doesn't seem to exist #390

silvenon opened this issue Jul 1, 2014 · 7 comments

Comments

@silvenon
Copy link

silvenon commented Jul 1, 2014

This is possibly my mistake, but I'm having a hard time getting the response data processed with materializeData, because data doesn't have a map method. Where is it getting it from? (Btw, I love how I can actually read the source code, as opposed to Ember Data.)

I'm using the latest build of EM.

@mikeauclair
Copy link

I was running into this as well; turns out I wasn't setting collectionKey for a given model, so ember-model was trying to treat the entire json payload as an array (thus the .map call)

@silvenon
Copy link
Author

silvenon commented Aug 5, 2014

I forgot where I was running into this issue. I'll definitely check if I was doing the same mistake, thanks :)

@grapho
Copy link

grapho commented Aug 7, 2014

I have this same issue. Pulling a collection from API and materializeData seems to fail... even if I set the collectionKey.

@silvenon
Copy link
Author

Ok, back on track.

This happens to me on #fetch, which should return a single model, not a collection, so it shouldn't be treating it as an array.

@silvenon
Copy link
Author

Possibly related to #408.

@silvenon
Copy link
Author

Nope 😢

@silvenon
Copy link
Author

This StackOverflow question describes my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants