-
Notifications
You must be signed in to change notification settings - Fork 1
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
support nested relations? #9
Comments
It looks it is possible and that's exactly the point where I am trying to solve on my project. The include parameter already works but when I use the async parameter in the model entries, it's not looking at the host and namespace. |
This can be seen at: Where I changed both url = `${Ember.get(this,'host')}/${Ember.get(this,'namespace')}${link.related}`; |
Interesting. I feel like endpoints should be returning the full url here. @tkellen thoughts? |
No prob, I can update this (will do first thing tomorrow) It seems like On Apr 30, 2015, at 6:04 PM, Brendan McLoughlin [email protected] Interesting. I feel like endpoints should be returning the full url here. — |
@leobalter what does the JSON response from the endpoint look like? For some reason I can't get the v2 version of my api to work. |
Thanks @leobalter. @tkellen, I'd prefer not to add the complexity to the adapter to make it try and decide if it needs to add the namespace to a |
@bmac Try re-running get-secrets and provisioning? Working on the URLs thing now. |
PS: I need to update the API to only run one version--the one you have checked out on your local machine. The current deployment setup for the API clones and checks out each version--if you set /cc @bobholt if you have any more trouble. |
IMHO, this looks very like an adapter responsibility. As the host and namespace is part of the adapter settings, relative links should also be resolved by the adapter. My implementation on #18 is only a workaround and it needs to be improved (needs to check the existence of values, etc) but it seems weird to get the resolved url on the other cases. |
@leobalter I disagree. The logic for building the urls should live in the server. It makes it easier to change that logic or update the url in the future without also requiring a change in the client. |
Some context:
In this example, an organization has projects and a project has phases. Sometimes, a user may wish to see the organization related to the phase, but not want the intermediate project record in the response.
This can be accomplished using endpoints with the following:
GET /project-phases/12?include=project.organizations
Is supporting this even possible with ember-data @bmac?
The text was updated successfully, but these errors were encountered: