Aggregate with @Entity annotation


I’m reading Axon documentation and I’m wondering what is the purpose of having @Entity on aggregate (see
Does is mean that Axon will persist the actual state into database?



Hi Pavel,

I think that if you want to persist the actual state into the database you have to explicity configure a Standard repository.

According with the documentation ( you can use Standard repositories instead Event Sourcing repositories. So Axon provides the GenericJpaRepository that expects the aggregate to be a valid JPA Entity.

Hope this helps you out.


Hi Renê,

thanks for the provided link. After reading the documentation it is now clear to me.



Dne čtvrtek 8. listopadu 2018 17:20:00 UTC+1 Renê Michels Rodrigues napsal(a):