Event listener flush infinite loop

Description

Using an event listener (eg. PreDeleteEventListener) that calls flush itself, leads to infinite loop where flush re-triggers the same event.

Use case: batch processing inside event listener, where entity manager’s flush and clear is called after each batch was processed.

Environment

None

Assignee

Unassigned

Reporter

Alex CD

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure