JPA UPDATE not flushing
April 3, 2020
I had a problem where an UPDATE in a Spring repository wasn't updating the cached hibernate data. The update was working on the database, but stale information was held and returned from the service.
@Modifying(flushAutomatically = true) @Query("UPDATE RoomDayEntity rd SET rd.cacheStaffMemberName = ?5, rd.staffMember.id …