Browse Source
RuleChainEntity and RuleChainDetailsEntity map to the same DB table. When RuleChainDetailsEntity is loaded into the persistence context (e.g. during isUpdateNeeded metadata comparison) and then the same row is updated via RuleChainEntity (during saveRuleChain), the cached RuleChainDetailsEntity becomes stale. Subsequent save via RuleChainDetailsEntity fails with OptimisticLockException. Fix: detach the entity immediately after loading in findById so it does not linger in the persistence context.pull/15361/head
1 changed files with 12 additions and 0 deletions
Loading…
Reference in new issue