How to implement triggers in hibernate

后端 未结 1 1810
离开以前
离开以前 2021-01-11 09:36

I want to implement something similar to triggers in hibernate.

What I need is when a column in a table attains a specific value, a row should be inserted in anothe

1条回答
  •  感情败类
    2021-01-11 09:57

    That's described in Chapter 14. Interceptors and events.

    You can, for example, intercept a post-update event.

    However, using the event system for business operations might not be the best idea (they are best used for infrastructure concerns). You should use a higher level layer for that.

    0 讨论(0)
提交回复
热议问题