Hibernate JPA Entity listener @Pre and @Post don't work as expected

后端 未结 1 1140
轻奢々
轻奢々 2021-01-25 00:22

I\'m building a real time app and trying to use entity listeners to keep my state up to date. The basic idea is that whenever an area of business logic changes, I re-load the af

相关标签:
1条回答
  • 2021-01-25 01:04

    From the documentation:

    A callback method must not invoke EntityManager or Query methods!

    In practice, the behaviour if you do it is undefined, hence the results you observe in your examples.

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