public class MyClass extends AbstractAggregateRoot<MyClass> {
@Id
@Column(name = "INSTANCE_ID")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "HIBERNATE_SEQUENCE")
@SequenceGenerator(name = "HIBERNATE_SEQUENCE", sequenceName = "HIBERNATE_SEQUENCE", allocationSize = 1)
private Long id;
@Version
@Column(name = "VERSION")
private Long version;
@PreUpdate
public void beforeUpdate() {
registerEvent(new MyClassModifyEvent(this));
}
}
This is not working because @PostUpdate is called after @DomainEvents method, so my event is not being caught. I think this issue is raised after updating from spring boot 2 to 3, because before update it was working fine. Any solutions?
Comment From: philwebb
@DomainEvents is a Spring Data annotation so I'm afraid you'll have to raise an issue with here. I would suggest that you provide a minimal reproducer so that they can help you.