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

Can't use inherited relationships in includes #590

Closed
andrus opened this issue Nov 8, 2022 · 0 comments
Closed

Can't use inherited relationships in includes #590

andrus opened this issue Nov 8, 2022 · 0 comments
Labels
Milestone

Comments

@andrus
Copy link
Contributor

andrus commented Nov 8, 2022

When doing a GET on a superclass in an inheritance hierarchy, Agrest allows to include attributes from any subclass, but when including a relationship, an exception is thrown:

i.a.j.p.JaxrsAgExceptionMapper: 500 Internal Server Error (Exception processing Agrest request) 
[cause: No such relationship: BaseEntity.relName]

This happens under very specific condition:

  • Inherited entity is itself a child entity of another relationship
  • There is an "exp" in the request
@andrus andrus added the bug label Nov 8, 2022
@andrus andrus added this to the 5.0.M9 milestone Nov 8, 2022
andrus added a commit that referenced this issue Nov 9, 2022
* a test to reproduce
* the fix
@andrus andrus closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant