-
Notifications
You must be signed in to change notification settings - Fork 301
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
Regression: GET_SINGLE requests to parent class do not find instances of child classes #614
Comments
This used to work in 0.17.0 by the way. |
This is a design decision I made in order for the different request methods (GET, POST, etc.) to be more uniform and to fit more cleanly with the requirements of the JSON API specification. See #200 (comment) for a summary of what is supported and what is not supported. Basically, if we allow fetching from |
I think as its That would also match the polymorphism in SQLAlchemy. |
Maybe it's even simpler, and you should really just rely on how SQLAlchemy is configured. That is, if the resource can be found by |
I guess following SQLAlchemy's lead makes sense. Let's first locate the relevant test cases that need to change in |
Considering having a model called A and a model called B, where B is a sublcass of A, there is an issue with getting single resources. A and B are polymorphic in SQLAlchemy.
GETing
/api/A
returns a list of all instances of A and B, but GETing/api/A/1
returns 404 if the object with id 1 is an instance of class B.It should be possible to get resources of a child model by GETing it through the parent model endpoint.
The text was updated successfully, but these errors were encountered: