What I am doing is that i am trying to get the aggregate from repository and then process that particular event and mark it as a new event...so that query recognizes that it is a update event. But the problem is that I am not able to get that particular aggregate.
What I have done is here:
LockAwareAggregate<CustomerAggregate, EventSourcedAggregate<CustomerAggregate>> lockCustomerAggregate =
customerEventSourcingRepository.load(command.getId().toString());
EventSourcedAggregate<CustomerAggregate> eventSourcedCustomerAggregate =
lockCustomerAggregate.getWrappedAggregate();
CustomerAggregate customerAggregate = eventSourcedCustomerAggregate.getAggregateRoot();
customerAggregate.updateAddress(command.getAddress());
I used this code in 2.4.3 and it was returning a CustomerAggregate
but right now it's returning a LockAwareAggregate
.
Can you please suggest where I am getting wrong.
can you please also share whats message in
UnitOfWork work = DefaultUnitOfWork.startAndGet(message??);
Thanks in advance.