blaze-persistence icon indicating copy to clipboard operation
blaze-persistence copied to clipboard

FetchStrategy.SELECT produces unexpected result

Open david-kubecka opened this issue 2 years ago • 0 comments

See test case: https://github.com/Blazebit/blaze-persistence/pull/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.

david-kubecka avatar Jan 08 '23 10:01 david-kubecka