dimanche 26 juillet 2015

Using links with Ember Data

I have a model Teacher which has many Students.I want to lazy-load the students association so I use the "links" format. All is ok, when my JSON is:

"links": {
  "students": "/teacher/1/students"
}

But when i try to add "meta" property:

"links": {
  "students": {
     "href": "/teacher/1/students",
     "meta": 20,
  }
}

I'm getting an error:

Error while processing route: teacher Assertion Failed: You have pushed a record of type 'teacher' with 'students' as a link, but the value of that link is not a string. Error: Assertion Failed: You have pushed a record of type 'teacher' with 'students' as a link, but the value of that link is not a string.




Aucun commentaire:

Enregistrer un commentaire