You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of version 13.6.6, queries no longer retrieve deep soft-deleted paths when multiple fetchLazy(path) are chained. This differs from
Versions prior to 13.6.6
and from fetch(), which doesn't have issues with multiple fetch paths like query .setIncludeSoftDeletes().fetch("account").fetch("account.environment")
The minimal reproduction PR linked below demonstrates workarounds.
Actual behavior
// demonstrates new behaviour in 13.6.6// when: lazy fetching serviceAccount AND serviceAccount.environmentList<UsageRaw> lazyUsageMultiplePaths = server.find(UsageRaw.class)
.setIncludeSoftDeletes()
.fetchLazy("serviceAccount")
.fetchLazy("serviceAccount.environment")
.findList();
// then: soft-deleted environments are NOT loaded (not the case before 13.6.6)assert(lazyUsageMultiplePaths.size() == 2);
assert(lazyUsageMultiplePaths.stream().allMatch(accountLoaded()));
assert(lazyUsageMultiplePaths.stream().filter(environmentLoaded()).count() == 1);
// demonstrates workaround, use single path, all required properties are loaded// when: lazy fetching serviceAccount.environmentList<UsageRaw> lazyUsageSinglePath = server.find(UsageRaw.class)
.setIncludeSoftDeletes()
.fetchLazy("serviceAccount.environment")
.findList();
// then: soft-deleted environments loadedassert(lazyUsageSinglePath.size() == 2);
assert(lazyUsageSinglePath.stream().allMatch(accountLoaded()));
assert(lazyUsageSinglePath.stream().allMatch(environmentLoaded()));
Expected behavior
See conversation in Ebean Group.
As of version 13.6.6, queries no longer retrieve deep soft-deleted paths when multiple
fetchLazy(path)
are chained. This differs fromfetch()
, which doesn't have issues with multiple fetch paths likequery .setIncludeSoftDeletes().fetch("account").fetch("account.environment")
The minimal reproduction PR linked below demonstrates workarounds.
Actual behavior
Steps to reproduce
See the minimal reproduction which includes unit tests demonstrating the issue and workarounds.
The text was updated successfully, but these errors were encountered: