-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
Include Query Error Not Working #861
Comments
Hi @mdhthahmd, which version of JsonApiDotNetCore are you using? I'm asking because it should work. We have various usages in tests, for example here. Assuming you're using a recent 4.x prerelease version, it would help to include the error message you're getting (with stack trace) or post some code to reproduce the problem. |
Hi @bart-degreed, i just cloned the repo and got started today, so current master/main branch. |
I've verified this on master and you're correct this does not work. Unfortunately it is caused by a bug in EF Core. You can help us by upvoting that issue. As a workaround, you can disable paging: options.DefaultPageSize = null; in JsonApiDotNetCoreExample.Startup.ConfigureJsonApiOptions method. That makes the request succeed, but still fails when paging at both levels is explicitly asked for: GET http://localhost:14140/api/v1/articles/?include=tags&page[size]=1,tags:1 HTTP/1.1 |
Hi @bart-degreed , the work around Include query is not working as intended either way |
Ok, i finally found out the cause, i was using sqlite and the error is reproducible, when i switched to sqlserver the feature works as intended, so i am geussing this has something to do with sqlite provider for efcore @bart-degreed |
Hi, i am trying to implement many-to-many and one-to-many relationships in this library, so i followed the code samples and documentation but i am unable to get the include query working,
For example when i ran the provided example project which has the many-to-many relationship between Articles and Tags,
GET /articles works and return the correct response, while GET /articles?include=tags return 500 error.
It looks like any resource that has to many relationship does not work, with the provided example and documentation. So what is the intended way of implementing to-many relationships?
The text was updated successfully, but these errors were encountered: