Skip to content

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

Open

Description

@silvenon

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.

Activity

  1. mikeauclair commented on Aug 5, 2014

    @mikeauclair

    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)

  2. silvenon commented on Aug 5, 2014

    @silvenon
    Author

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

  3. grapho commented on Aug 7, 2014

    @grapho

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

  4. silvenon commented on Sep 12, 2014

    @silvenon
    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.

  5. silvenon commented on Sep 13, 2014

    @silvenon
    Author

    Possibly related to #408.

  6. silvenon commented on Sep 15, 2014

    @silvenon
    Author

    Nope 😢

  7. silvenon commented on Sep 15, 2014

    @silvenon
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions