我目前正在使用<条码>@PostPersist和@PostUpdate
,并在这些触发器上工作。 我在继续增加一些实体。 问题是,同一交易中究竟是哪些触发因素,如果不可能强迫?
For me it works this way.
While I was looking through the logs the transaction isn t existing ( it s commited just before the trigger is launched ) which prevents me ( without REQUIRES_NEW
on the persisting method from injected bean ) from saving the additional entities in database.
REQUIRED
attribute is totally ignored, and MANDATORY
attribute do not throw an exception.
这个问题与Junnit有关(因为我是在发展中)。 ?
如果不可能将交易延伸到这一触发点,那么如何确保如果退约发生在<条码>@PostPers和<条码>@PostUpdate之前,这些行动也将得到滚动支持。