Skip to content
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

using include with related urls fails #84

Open
digitalsadhu opened this issue Dec 29, 2015 · 2 comments
Open

using include with related urls fails #84

digitalsadhu opened this issue Dec 29, 2015 · 2 comments

Comments

@digitalsadhu
Copy link
Owner

Example of failing urls:
GET http://localhost:3000/api/posts/9/author?include=posts

{
  "errors": [
    {
      "status": 500,
      "source": "",
      "title": "TypeError",
      "code": "",
      "detail": "Cannot read property 'keyFrom' of undefined"
    }
  ]
}

Whats happening is that everything hinges off the base model, in this case post so loopback thinks you are asking for posts related to posts which is wrong. We want posts related to the posts authors.

@tsteuwer
Copy link
Collaborator

Ignore this:

This is actually a case with /plural/:id/singular eg http://127.0.0.1:3000/api/people/70/address, not just with the includes param.

@digitalsadhu it is failing in the emberloop repository.

@digitalsadhu
Copy link
Owner Author

Worth verifying if this is still an issue. Recent changes might have fixed.

Todo:

  • add test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants