Project

General

Profile

Actions

bug #7377

open

AdvancedBeanInitializer.bulkLoadLazyBeans causes autoFlush being triggered

Added by Andreas Kohlbecker almost 5 years ago.

Status:
New
Priority:
New
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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.

Actions

Also available in: Atom PDF