hibernate session.flush with spring @transactional
问题 I am using Spring and Hibernate in my application and using Spring Transaction. So I have a service layer with annotation @Transaction on methods and DAO layer having methods for database query. @Transactional(readOnly = false) public void get(){ } The issue is when I want to save an object in the database,then I have to use session.flush() at the end of DAO layer method. Why? I think if I have annotated @Transaction , then Spring should automatically commit the transaction on completion of