A Session flush should be triggered prior to executing the doWork and doReturningWork methods with JPA bootstrap

Description

Currently, if we execute the following test case:

We can see that the doWork or doReturningWork methods do not trigger a flush when bootstrapping via JPA.

For consistency, just like the Persistence Context is flushed prior to executing any JPA query (e.g., JPQL or native SQL), these two methods should also trigger a flush.

Environment

None

Activity

Show:
Nathan Xu
September 8, 2020, 1:17 PM

Interesting. Do you have the plan to create a PR in near future? If not I can create one and assign you as the reviewer.

Vlad Mihalcea
September 8, 2020, 2:09 PM

At the moment, I don’t have the time to implement this feature, so feel free to provide a PR for it. I’ll try to review it when it’s done.

Assignee

Unassigned

Reporter

Vlad Mihalcea

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure