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 la
Yes, if you have @Transactional
for your DAO method then you need not flush the session manually, hibernate will take care of flushing the session as part of committing the transaction if the operations in the method are successful.
Check this link to know on how @Transactional works - Spring - @Transactional - What happens in background?