bug #7377
AdvancedBeanInitializer.bulkLoadLazyBeans causes autoFlush being triggered
Start date:
04/27/2018
Due date:
% Done:
0%
Severity:
normal
Found in Version:
Description
initializing a Team through the AdvancedBeanInitializer causes an autoflush:
In AdvancedBeanInitializer.bulkLoadLazyBeans(BeanInitNode node) the query.list()
with "QueryImpl( SELECT c FROM TeamOrPersonBase as c WHERE c.id IN (:idSet) )" triggers an autoFlush of the team entity.
In turn of the autoflush the team.titleCache is generated which causes the teamMembers to be initialized, which in principle makes
the TeamAutoInitializer
obsolte but only if the flush mode is on AUTO
.
The autoFlush of the session is unexpected and may cause unwanted side effects, therefore it should be avoided.
Associated revisions
ref #7377 modifying test to avoid autoflush