You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a dataloader that uses QueryContext that fetches a collection of entities that inherits from an abstract class:
[DataLoader]publicstaticasyncTask<Dictionary<int,Page<FarmAnimal>>>GetFarmAnimalsByFarmerIdAsync(IReadOnlyList<int>farmerIds,QueryContext<FarmAnimal>queryContext,PagingArgumentspagingArgs,AnimalContextcontext,CancellationTokencancellationToken){varresult=awaitcontext.FarmAnimals.Where(fa =>farmerIds.Contains(fa.FarmerId)).OrderBy(fa =>fa.Id).With(queryContext)// I believe this is the culprit.ToBatchPageAsync(x =>x.FarmerId,pagingArgs,cancellationToken);returnresult;}
Execute a query that queries farm animals on farmer:
Product
Hot Chocolate
Version
15.0.3
Link to minimal reproduction
https://github.com/cenx1/HC15AbstractInheritanceProblem
Steps to reproduce
Use entities that inherit from an abstract class:
Use DbContext for the entities:
Create a dataloader that uses QueryContext that fetches a collection of entities that inherits from an abstract class:
Execute a query that queries farm animals on farmer:
What is expected?
The response returns something like:
What is actually happening?
Response:
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: