query: update Order set f='1' where key in (1,2,3,4,5)
@PostUpdate
public void postUpdate(Order order) {
....
}
I wonder what happens if I work as above.
If you execute a bulk update/jpql update query of the from "update Order set f='1' where key in (1,2,3,4,5)" you get those rows affected and nothing else. JPQL bulk updates/deletes run in the database, so they do not affect your java entities and do not cause entity lifecycle events to occur.
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.