Hibernate Envers - Doesn't write audit records for createQuery(…).executeUpdate(), only .persist() and .merge()

后端 未结 3 1318
灰色年华
灰色年华 2021-01-19 09:04

I have 3 ways things get written to the DB

public void create(T object) {
    entityManager.persist(object);
}

public void update(T object) {
    object = e         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-19 09:23

    It looks like Avinash T. is right - if you want to create native SQL query, use createNativeQuery(String sqlString) method of EntityManager. Using createQuery(String ejbqlString) is only possible if you're using EJB QL. Hope it would help.

提交回复
热议问题