Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • If you can ensure that an Author instance can only exist if the author exists, then you can also ensure that an AuthorId can only exist if the author exists, or am I missing something? It is of course up to the internals of the repository or aggregate root or whatever to maintain the consistency of the underlying data. Sometimes, the best solution is to relax consistency requirements a bit. Commented Jan 27, 2022 at 11:33
  • "You can provide just an ID instead of a complete aggregate root, what is esspecially useful when writing tests" - eeeh, I don't know about that... In your tests, are you pulling these objects from the database? Commented Jan 27, 2022 at 21:22