[hibernate-dev] Question about current flush ordering

Yoann Rodiere yoann at hibernate.org
Tue Mar 28 04:16:44 EDT 2017


On 28 March 2017 at 10:03, Vlad Mihalcea <mihalcea.vlad at gmail.com> wrote:

> There musts be a reason for choosing this ordering, but I can't figure out
> why the EntityDeleteAction was chosen to be executed last.
>

Isn't it simply to avoid foreign key constraints to explode? When you
update a reference to a foreign key *and* delete the previous target of
this reference in the same transaction, you want to execute the update
first and the delete last.

I can't imagine why orphan removals are executed first, though.

Yoann Rodière <yoann at hibernate.org>
Hibernate NoORM Team


More information about the hibernate-dev mailing list