#3173 - BeanSet lazy loading / Too many DataSource connections used

- The error reported was that a DataSource connection pool maxed out
- The symptom was that there was an additional lazy loading queries invoked via the hashCode/equals implementation of ManyToMany Set.
- The fix is for BeanSet init() to lazy load with onlyIds = false, that avoids the extra lazy loading query from being executed
This commit is contained in:
Rob Bygrave
2023-08-29 18:28:09 +12:00
parent b7804e7486
commit 359a55d7a5
4 changed files with 131 additions and 1 deletions
@@ -136,7 +136,7 @@ public final class BeanSet<E> extends AbstractBeanCollection<E> implements Set<E
if (disableLazyLoad) {
set = new LinkedHashSet<>();
} else {
lazyLoadCollection(true);
lazyLoadCollection(false);
}
}
} finally {