Question: OData DB Query References #1435
Unanswered
chris-clark-serverless
asked this question in
General
Replies: 1 comment
-
I'm not sure what exactly the OData library does, if anything, to address this specific problem. But here are some candidates:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have been using OData successfully in our project. However, recently we needed to build an endpoint that did not use OData. In that endpoint we returned an ActionResult of IEnumerable
What we noticed after returning this object which came from our DB using Entity Framework Core, a 500! After looking into it, the Query Included an Include. We use Includes extensively and every object has these virtual collections pointing back to every object that has a FK to pretty much every table. So even the OData implementation has these.
As a stop-gap I added the JSON serializing setting to handle reference loops. And now I'm curious, how does OData handle it? Do you let EFCore return these garbage circular references, and handle them client side, app server side? Or do you do internal massaging of the query as to not return the circular references?
Beta Was this translation helpful? Give feedback.
All reactions