3 ms·
Here is the code <https://github.com/eugene-khyst/postgresql-event-sourcing/blob/f98a8c9a38388fb412c846a609a14ffcaf2f1020/postgresql-event-sourcing-core/src/mai
by eugene-khyst 3y ago
Here is the code <https://github.com/eugene-khyst/postgresql-event-sourcing/blob/f98a8c9a38388fb412c846a609a14ffcaf2f1020/postgresql-event-sourcing-core/src/main/java/eventsourcing/postgresql/service/AggregateStore.java#L126 https://github.com/eugene-khyst/postgresql-event-sourcing/bl...>
- koevet 3y agoI noticed that you use the @Transactional annotation on class definition. This will create a write transaction for every public method of the annotated class, including read only methods. You should consider using readOnly=true for read methods. Additionally, I would consider using two data sources, one for write queries and a read only ds for the Q part of CQRS.
- eugene-khyst 3y agoThanks for suggestions. I will add @Transactional(readOnly = true) annotation. I will mention in the README the possibility of using two data sources.
- lacrosse_tannin 3y agoalright thanks. this java stuff is pretty hard for me to follow. it looks like java is doing the aggregating, but maybe this is some kind of ORM