@felipe wrote:
Hi,
first, explaining the models:
- A Parent model that have a “hasMany” relationship
- A Child model
- The Address model ( the “hasMany”) which has a “belongsTo” Parent.
And, at some point in the application, I receive a Child payload with the addresses, but, for some reason I don’t know (yet), the addresses are not binding to the Child model properly.
It’s something like this:
// person.js export default DS.Model.extend({ // . . . addresses: DS.hasMany('address', {async: false}) }) // customer.js export default Person.extend({ // . . . }) // address.js export default DS.Model.extend({ person: DS.belongsTo('person') })
The addresses are in the payload, but Customer model does not have the addresses in it.
What I am doing wrong?
Thanks!
Posts: 1
Participants: 1