Giter Site home page Giter Site logo

ember-data-meta-links-improvements's People

Contributors

ember-tomster avatar pangratz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

matthewvalimaki

ember-data-meta-links-improvements's Issues

Can only access relationship links from findRecord, not findAll

Hi, I've been trying to fix this myself but haven't been able to figure it out so far.

When I get a single record with findRecord that has a hasMany relationship, I can request the relationship's links. However, if I use findAll, the relationship's links do not get populated.

Delete with no response body fails

When I do delete with response status code of 204 and no response body I get this:

TypeError: Cannot read property 'meta' of undefined
    at Class.didSaveRecord (store.js:62)
    at Class.superWrapper [as didSaveRecord] (ember.debug.js:24805)
    at store.js:2191
    at Backburner.run (ember.debug.js:294)
    at Class._adapterRun (store.js:2058)
    at store.js:2182
    at tryCatch (ember.debug.js:50954)
    at invokeCallback (ember.debug.js:50969)
    at publish (ember.debug.js:50937)
    at ember.debug.js:40417

Line 62 of store.js tells me that didSaveRecord was accessed where it uses data. So I think the problem is this

didSaveRecord(internalModel, { data }) {
. It should check if data.meta and data._top_level_meta are defined.

Store patch assumes relationships are kind of hasMany and has links

I am getting You tried to get the 'testCase' relationship on a 'execution' via record.hasMany('testCase'), but the relationship is of type 'belongsTo'. Use record.belongsTo('testCase') instead with

...,
relationships: {
   "test-case": {
      id: 5,
      type: "test-case"
   }
}

and this seems to be caused by

pushed.hasMany(name).__update_links(links);
. If I comment out this line error goes away and things work. It actually does two assumptions:

  1. there are links (which it doesn't)
  2. it is hasMany and not belongsTo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.