-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#29] Feature/aggregate with immutable identifier #54
base: master
Are you sure you want to change the base?
[#29] Feature/aggregate with immutable identifier #54
Conversation
Ok, so I merged the changes from master in to this branch, which made it a lot easier! Please have a look on the solution, even if WIP. Currently, the tests for the spring-autoconfigure are missing and the starter is empty (just passing the dependency, but not bundling it together with other deps). Still, the provided solution allows to use data classes with immutable identifier as aggregates, which is actually not the first step in the Scala challenge we had with Jan-Hendrik but its fulfillment. The manual configuration of such an aggregate is inside the example code, but is currently commented out. In addition (Jan-Hendrik don't have it at all), I implemented automatic configuration of such aggregates, their aggregate factories and aggregate repository (including the identifier converter) and put it into a spring configuration. Again, check the example project for this, especially You can actually also run the example application and will see the stuff working. I'd like to get any feedback from you guys, before I implement all JUnit tests for the autoconfigure module and finalize all this. |
Thank you for this PR Simon, this looks great! In the next days, I'll go through the whole PR and do the initial review and provide you with needed feedback. In the meantime, I also changed set this as a Draft PR. Feel free to remove the draft status whenever it's ready. |
...lin/org/axonframework/extensions/kotlin/aggregate/AggregateWithImmutableIdentifierFactory.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously it's a WIP, but regardless I still have to much questions to approve this as it is.
Added, I feel things like the AggregateIdentifierConverter
and the entire Spring Boot auto configuration are, although nice, not needed for a PR about a new AggregateFactory
. I'd rather see those back in a different PR so we keep focus on what's aimed for with feature #29.
kotlin-example/src/main/kotlin/org/axonframework/extension/kotlin/example/core/BankAccount.kt
Outdated
Show resolved
Hide resolved
kotlin-example/src/main/kotlin/org/axonframework/extension/kotlin/example/core/BankAccount.kt
Outdated
Show resolved
Hide resolved
...rc/main/kotlin/org/axonframework/extensions/kotlin/aggregate/AggregateIdentifierConverter.kt
Show resolved
Hide resolved
...lin/org/axonframework/extensions/kotlin/aggregate/AggregateWithImmutableIdentifierFactory.kt
Outdated
Show resolved
Hide resolved
kotlin/src/main/kotlin/org/axonframework/extensions/kotlin/aggregate/AggregateFactoryMethod.kt
Outdated
Show resolved
Hide resolved
...ework/extensions/kotlin/aggregate/EventSourcingAggregateWithImmutableIdentifierRepository.kt
Outdated
Show resolved
Hide resolved
...ework/extensions/kotlin/aggregate/EventSourcingAggregateWithImmutableIdentifierRepository.kt
Outdated
Show resolved
Hide resolved
@smcvb Thank you for such a comprehensive feedback, I'll answer change the PR accordingly. I'll need some time for this... |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Merge in master
@smcvb What do you think about this PR? |
@zambrovski, honestly, I thought a lot about this issue, together with @sandjelkovic too. To come around to our idea on this PR, though, let me break it down:
So, that's my thought on this PR. And, as always, we appreciate the effort you've put in so far! |
Great to get some movement in it...
Ok - I'll try to slice the original issue to multiple issues and handle it then... By the way - I personally don't like long discussions in issues. GH offers "discussions" for this... Is it worth to activate those to run those code-related discussions not in PRs or in Issues? Thank you for the answer, I'll try to finish Kafka Upcasters first and then will switch over back to this one.... |
Awesome, happy to hear your replies @zambrovski.
Agreed, a form of discussion on this would be good.
I've seen it come by, but haven't used it yet. We are internally discussing the idea though.
Great! I'll see the adjusted PR's flying by as soon as your time allows it. :-) |
Removing the milestone as this is still under discussion, while the release is intended to come soon. Will add this to the following release milestone for further discussions. |
Just to make the development visible to AxonIQ guys, see #29
Implemented :
This can be used to manually configure Aggregates.
This is used to detect the Aggregates automatically and configure them using the AggregateRepository, AggregateFactory and AggregateIdentifierConverter.