-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when side loading nested resource #9
Comments
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 |
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.
The text was updated successfully, but these errors were encountered: