It is strange that I uses a from query get a row(which is a object) by list().And I change one of a value of this object but not update.In fact the value was update to database automatically.How is this issue?Thanks.
It is strange that I uses a from query get a row(which is a
Share
That is the default hibernate behavior. Any object loaded / queried using hibernate is managed by hibernate. It will automatically detect for changes of those objects on session close and update the database. If you don’t want that to happen you can set the flush mode on the session to Manual (not recommended).