Hibernate sort the statements that are executed when flush is invoked in that order: All Inserts, all Updates all deletes (see below for the exact definition).
What I want to know is, is this behaviour a standard behaviour required by JPA and do Eclipselink the same, or is this just a Hibernate Feature?
Hibernate Reference, Chapter 11.10. Flushing the Session
The SQL statements are issued in the following order:
Any JPA implementation can do what it needs in terms of flush ordering; the spec does not define such things, solely that all data makes its way into the datastore. Not all implementations will order them as Hibernate does. Some (eg DataNucleus JPA ) do it based on pure referential integrity requirements in terms of what needs to be there first
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.