Replies: 1 comment
-
You could reorder the results to match the order of your keys (roles) or use MappedBatchLoader to return a Map with: roleService.findByIdIn(roles).stream().collect(Collectors.toMap(Role::getId, item -> item)); |
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
-
I am using boot-graphql-kick-start in my project(I used Netflix DGS. Result is the same). When I used Dataloader, the result is missmatching. where am I wrong? Can you help me?
Query:
![image](https://user-images.githubusercontent.com/7022571/115596382-b5b76080-a2e0-11eb-99f5-4c29ff5736cd.png)
Result:
![image](https://user-images.githubusercontent.com/7022571/115596571-ec8d7680-a2e0-11eb-8d2f-8eced3f4e56e.png)
Entity: I have ManyToOne Relation With My RoleEntity
![image](https://user-images.githubusercontent.com/7022571/115596724-1c3c7e80-a2e1-11eb-81ab-c1e1c78a73ca.png)
DataLoader Method: I'm Using BatchLoader for n+1.
![image](https://user-images.githubusercontent.com/7022571/115596785-2fe7e500-a2e1-11eb-9971-0ce4f2cede27.png)
Hibernate Query: In dataLoader Iam wathcing the result. Is seems correctly
![image](https://user-images.githubusercontent.com/7022571/115596849-3d04d400-a2e1-11eb-8c6d-3d67dac7952e.png)
Beta Was this translation helpful? Give feedback.
All reactions