hibernate session.save() does not reflect in database

后端 未结 9 2150
臣服心动
臣服心动 2020-12-08 14:30

According to my understanding in hibernate (please confirm)

1- You have to session.close() if you get it by getSessionFactory().openSession()

9条回答
  •  无人及你
    2020-12-08 15:13

    Yeah session.save is not saved to database without have the transaction. Only way to do it is by using the

    true
    

    If this property is used you no need transaction and also you do not need session.flush() or session.close()

提交回复
热议问题