Mapping of modified flags for bidirectional association causes lazy loading of collections

Description

We have following mapping:

Follow steps:

  1. Update Ticket -> ModWorkUnit is created

  2. ModWorkUnit generate modified flag values by comparing newState and oldState:

    Comparing causes lazy loading of comments.

There is no need to compare audited biderectional association, because every change in comments comes with CollectionChangeWorkUnit.

We have several audited biderectional associations. Every single update to ticket, causes multiple queries on database.

The same applies to other types of work units: CollectionChangeWorkUnit.generateData, DeleteWorkUnit.generateData and AddWorkUnit

Environment

None

Status

Assignee

Chris Cranford

Reporter

Michal Kurtak

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure