After springBoot changes the checked entities, will set change the database?

A very simple editing function, which uses springBoot, to find out the entity, change its properties, and then return, that is, it has been found that the value of the database has also changed. Is this normal? asked several java, and they all said no. What is its internal implementation? The code is as follows

clipboard.png

Mar.04,2021

this may depend on what dao framework is used at the underlying level.
for the data queried by hibernate, modifying its properties may modify the value of the database. This seems to be the caching mechanism of hibernate.


generally not. Debug to see what method performs the update operation of sql. Does the log print sql statements?

Menu