blaze-persistence
blaze-persistence copied to clipboard
FetchStrategy.SELECT produces unexpected result
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
SUBSELECTstrategy. - 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
MULTISETstrategy lead to an error (java.lang.ArrayIndexOutOfBoundsException), though here it works well. I suggest to check also the handling ofMULTISETand if it seems to be ok I will try to create another reproducer.