-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
How to load a hasMany relationship? #159
Comments
Hi @andrewhavens ! Currently we can't do that out of the box - Ember Infinity has a hard dependency on there being an paginated endpoint for the model you're actually displaying. There's various ways to get around this, but the path of least resistance is to add/modify an API endpoint for your child model, like so:
That way you can use a param (or bound param, if it's dynamic) for Please reopen if this doesn't solve your issue! |
I think part of my question was simply how to change from a single model route to a route that returns multiple. I ended up with something like this. Posting it here in case it helps anyone else in the future.
|
perfect! |
Above solution is not working for me. API request is still going to: |
I have a route that loads a primary model and displays one of its
hasMany
relationships. I want to useember-infinity
to paginate thehasMany
relationship. Currently, my template simply calls{{#each model.children as |child|}}
. What do I need to modify in order to make this work withember-infinity
?The text was updated successfully, but these errors were encountered: