-
Notifications
You must be signed in to change notification settings - Fork 44
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
Auditing #83
Comments
DSL has a concept of history. This will log all versions of an aggregate to a separate history table. Eg:
will create a separate history table. Though, API for reading this is not yet synchronized across different languages :( But it should be soon. |
Great. Thanks a lot! May history track user who made the change? It would be great to have an example of that. |
Yeah, I guess I should write small tutorial about that. For now, the short answer is: you put them in you model.
or
A somewhat longer and confusing answer is: Ideally when you want to track some specific information in audit log, you create a mixin for it, such as:
now you can apply that mixin to appropriate aggregates, either manually though If you have your own repositories you can set those properties before passing them along to Revenj repositories, either manually in specific repository, or in somewhat generic manner during deserialization, or something along those lines. If you don't have your custom layer above Revenj and it's not easy to setup such generic application of audited properties, you can simulate (to a degree) such behavior via expressions on versioning concept:
|
The mixin idea also seems the best for me. Both ways are clear. I'll try it myself, but will be looking forward to a tutorial, as this approach is new for me, although it seems much faster and clearer than everything that I've seen with type safety. Thank you very much for your explanations. Feel free to close the issue, or you may have it open as a reminder to make a tutorial. If I manage to make a workable solution with auditing, I'll share it as a tutorial. |
What is the most conscious way to implement auditing in revenj? Ideally 'envers' like, but any idea would be welcome.
The text was updated successfully, but these errors were encountered: