Closed dsawardekar closed 11 years ago
I haven't tried this out myself, but could this be related to #4? You are defining relationships via strings but this doesn't seem to be supported quite yet. Do you still have the problem if you change your models to:
App.Post = Ep.Model.extend({
title: Ep.attr('string'),
body: Ep.attr('string')
});
App.Comment = Ep.Model.extend
author: Ep.attr('string',)
body: Ep.attr('string'),
post: Ep.belongsTo(App.Post)
});
App.Post.reopen({
comments: Ep.hasMany(App.Comment)
});
Thanks @jasonkriss. I must have glossed over this part in the docs. Sideloading works fine after doing the comments
assignment in reopen
.
No problem. Glad to hear that took care of it for now.
Yeah I think #4 will fix this. I will try and get this feature in soon. Closing this issue and we can track there.
Thanks for releasing Epf. It looks very promising.
I am having a problem with side loading
comments
for aposts
model. I am using the library compiled frommaster
withbuild-browser
.The
/posts
requests goes out and returns a 200, but the route throws the following exception.My models are,
And the model hook on the
PostsRoute
is,My server-side implementation is with active_model_serializers.
which gives the following json for
/posts
.Is there anything wrong with my json output. Can you please post sample json that Epf expects for this scenario.
Thanks.