Set hasMany Relation, but in HTTP Post is nothing


#1

Hi,

I want to create an new post object. that have many comment objects. In my case I want to create an new post object an append existing comment-objects to new post object. In HTTP-Post is no comments set why? The properties of post model would set, but not the hasMany relation from post -> comment. Why how I solve it?

        var post = this.store.createRecord('post', {
            subject: this.get('subject'),
            description:  this.get('description'),
            created: new Date(),
            pState: 'NEW',
            comments: this.get('controllers.comments.content')
        });
       post.save();

#2

I asked a similar question like that on stack overflow, http://stackoverflow.com/questions/18820943/properly-create-record-with-ember-data-that-has-belongsto-relationship with no response as of yet, but…

It turns out I suck, are you sure the controllers.comments.content are the comments?