Need Assistance - Unrequested Child Entity Collections Being Queried #160
CShelton11
started this conversation in
General
Replies: 2 comments 1 reply
-
Well, This was entirely my fault. I didn't look at the downstream repository. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Answered in #161 |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry for the lengthy post, but trying to be detailed.
I'm experiencing an issue where information I didn't request is being included in the info returned from sql server.
I'm hoping that you might point me in the right direction here...
My setup is outlined below:
Issue By Example:
If I were to invoke the PolicyCase endpoint on my api with the following url:
https://site.com/odata/policyCase?$top=1
I get a response back from the server like the following:
I didn't request the TicketDetails information in my query, but it is being provided anyway.
I can't see that I have configured anything incorrectly, and I can't believe that this isn't something that has been considered already.
Entity Classes:
Dto Classes:
Profiles:
Mappers:
_mapper = new MapperConfiguration(a => a.AddMaps(typeof(PolicyCaseProfile))).CreateMapper();
Extension Method:
Note - If I were to do the following: queryable.GetQuery(_mapper, options).ToList();
It returns all of the TicketDetails for the 1 record I filtered for.
I'm guessing it has something to do with the projection including a ToList in there somewhere, but I have to believe that this has been considered already (Like an option telling the projection to issue a Select statement instead of a ToList???).
How do I avoid this issue????
Any help is greatly appreciated...
Beta Was this translation helpful? Give feedback.
All reactions