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
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 ofMULTISET
and if it seems to be ok I will try to create another reproducer.