Questions tagged [aggregateroot]

A cluster of associated objects that are treated as a unit for the purpose of data changes. External references are restricted to one member of the Aggregate, designated as the root. A set of consistency rules applies within the Aggregate's boundaries.

441 questions
0
votes
1 answer

Which is aggregate root. Recipient or Cost ? DDD

I'm creating an application to analyze my expenses. I want to implement in a DDD way. My 2 main entities are : CounterPart(Recipient/Sender) and Expense(Cost/Income) class diagram It seems logical to take CounterPart as an aggregate root but I need…
0
votes
1 answer

Entity in Aggregate Without Identity?

I've been trying to wrap my head around domain-driven design concepts and a question I keep coming back to is how to deal with functionality that I would normally implement using a mutable class but doesn't have an identity of its own in the…
Charles
  • 3
  • 1
0
votes
2 answers

Aggregate modeling in domain-driven design

This question is in regards to domain-driven design and its related concepts. In this example, the software is responsible for managing a set of bus routes. A bus route refers to the set of stations where the bus arrives and departs. The schedule…
0
votes
1 answer

How to avoid aggregate being dependent on outside includes?

I do not use lazy loading. My root aggregate have entities (collection navigation properties). I want my aggregate to be self-contained, responsible for itself, and follow the Single Responsibility Principle (SRP), and adhere to high cohesion and…
0
votes
1 answer

Domain Driven Implementation - Updating a single property inside Aggregate Root

I am new to DDD and I would like to have some advice on a few challenges I am facing in the implementation of it. I am using Typescript to develop the application. The data is persisted in a Relational DB. We are not following CQRS pattern and our…
0
votes
2 answers

What is the difference between root and aggregate root in DDD

My friend came across this question in an interview which we still not able to find answer for. What is the difference between root and aggregate root in DDD? We are aware that there is aggregate root but not aware of root concept in DDD so is this…
Mo Haidar
  • 3,748
  • 6
  • 37
  • 76
0
votes
1 answer

Should we complicate aggreggate root due to an edge case?

Imagine that we are implementing a payment system using Event-sourcing and have events like PaymentCreated, PaymentAuthorized, PaymentSettled and PaymentInvoiced It seems obvious that Payment should be our aggregate root, all the operations are…
Lukas
  • 13,606
  • 9
  • 31
  • 40
0
votes
2 answers

Is it a good idea to implement CQRS Read model as an Aggregate?

Is it a good idea to implement CQRS Read model as an Aggregate? Or the read model should be kept as a POCO class?
DmitriBodiu
  • 1,120
  • 1
  • 11
  • 22
0
votes
2 answers

Can an aggregate issue its own commands?

Question Can an AR issue its own commands, or it is better to issue them through a processor that listen event emitted by the outer command? BTW: If you consider that this question could lead to "primarily opinionated” answers, I would still want to…
0
votes
1 answer

Aggregate Roots DDD/UoW/Repo/Service

I have some questions about the Aggregate Objects for Repositories. I'm making a Rest Service with DDD/UoW/Repo and Service pattern. Our new cloud web-apps shall use this service. In order to do this, we also have to sync data from the old…
0
votes
2 answers

Are collections of inner aggregates valid?

Lets say I have an AggregateRoot called Folder with a collection of sub-folders like this: class Folder : AggregateRoot { string Name { get; } ICollection Folders { get; } } The inner collection here is really just a list of…
Andreas Zita
  • 7,232
  • 6
  • 54
  • 115
0
votes
3 answers

Different aggregate root for insert and delete

Imagine we have the following aggregate root: public class Resource { public IEnumerable schedules {get;private set;} ... } When we want to add a new schedule we need to ensure that it will not collide with an existing one. This…
Pedro Faustino
  • 227
  • 3
  • 14
0
votes
1 answer

how to represent enums in DDD Aggregrate modeling

I am using Domain-driven-design for a project and as I am modeling the Aggregates I came across a scenario where one of its attributes has restricted input of only certain types. I know I would code this as an enum but aggregrate modeling is…
john
  • 1,057
  • 1
  • 17
  • 28
0
votes
1 answer

Should uniqueness be ignored when deciding if something is an Entity or Value Object?

Is uniqueness considered a persistence concern in DDD? The reason I ask is because I have a Customer object in an order quoting context. e.g. an order is for a customer and the customer must pay a certain rate. Technically, I won't allow a customer…
0
votes
1 answer

Validity of domain entity method based on context or caller

I am currently reading about DDD and have a issue how to implement a certain validation. Scenario: I have an entity Group that contains a list of Members which in turn consists of a User and a MemberState (Member, Admin). The entity has a method…