Spring事宜中read-only在Hibernate中的疑惑解析

Spring事务中read-only在Hibernate中的疑惑解析If you still want to prevent Hibernate from saving the

Spring事务中read-only在Hibernate中的疑惑解析

If you still want to prevent Hibernate from saving the object state in the session cache, you have to manually run the HQL queries in read-only mode. It would be a nice improvement to Hibernate to have a read-only mode to the session so that no object state is stored and no flush executed