Skip to content
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

FetchStrategy.SELECT produces unexpected result #1664

Open
david-kubecka opened this issue Jan 8, 2023 · 0 comments
Open

FetchStrategy.SELECT produces unexpected result #1664

david-kubecka opened this issue Jan 8, 2023 · 0 comments
Labels
component: entity-view kind: bug worth: high Implementing this has a high worth
Milestone

Comments

@david-kubecka
Copy link
Contributor

david-kubecka commented Jan 8, 2023

See test case: #1665

The offender here is the added @Mapping(fetch = FetchStrategy.SELECT) on getChildren. This leads to children in the GraphQL response being empty and therefore the added test assertion fails.

Notes:

  • The test fails also with the SUBSELECT strategy.
  • In my production system where I originally discovered this bug a similar model lead to runtime NPE instead of just an empty subresult. I think the root cause is the same in both cases.
  • Interestingly, in my project even the MULTISET strategy lead to an error (java.lang.ArrayIndexOutOfBoundsException), though here it works well. I suggest to check also the handling of MULTISET and if it seems to be ok I will try to create another reproducer.
@beikov beikov added kind: bug component: entity-view worth: high Implementing this has a high worth labels Jan 23, 2023
@beikov beikov added this to the 1.6.x milestone Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: entity-view kind: bug worth: high Implementing this has a high worth
Projects
None yet
Development

No branches or pull requests

2 participants