Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

How to createRecord With another belongTo relationship Model?

$
0
0

@ngkarkeong wrote:

HI there,

model({ guru_id }){ return RSVP.hash({ guru: this.store.findRecord(‘guru’, guru_id), booking: this.store.createRecord(‘booking’, { guru: this.guru}) }); } The relationship is booking belongsTo guru, and guru hasMany Booking. i am trying to use a new form to create a new “booking”. is there any standard implementation on this situation?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles