Danny MacMillan
Danny MacMillan

Reputation: 77

What is the practical difference between flush and commit?

executeInTransaction calls flush, not commit. I did some testing and flush does persist changes to the database across program runs, which to me is the definition of commit. So what is the difference between these two operations?

Put another way, what would motivate the decision to use flush over commit, or vice versa?

Upvotes: 0

Views: 298

Answers (1)

Maxim Mazin
Maxim Mazin

Reputation: 3966

flush does not finish the transaction, while commit does.

Upvotes: 3

Related Questions