Skip to main content
Software Engineering

Questions tagged [aggregate]

An aggregate is either a group of related objects/data or the result of some operation on such group. The tag can be used for example for language specific data structures, algorithms that combine data and GROUP BY queries, UML relationships, or DDD aggregates that combine dependent objects.

Filter by
Sorted by
Tagged with
0 votes
3 answers
96 views

How could I map a complex DTO to a Domain Aggregate in a Repository?

I'm working on a TypeScript application designed with DDD and using layered architecture. My infra layer has a repository that fetches a complex, nested DTO. My current implementation maps this DTO ...
5 votes
2 answers
151 views

Modeling invariants that requires data from multiple aggregates

I want to model the organizations and users using DDD. I have the following aggregate roots: Users Can join multiple organizations Can join at most 100 organizations Can only be deleted when it is ...
0 votes
1 answer
206 views

storing aggregates as json in postgresql all in one table

I am trying to decide what the best way of storing my data would be. I want to build a cqrs application where I also apply DDD principles like aggregates in the command side. I started with with ...
1 vote
1 answer
84 views

Aggregate design for a fuel tank with deliveries and fill level readings

So I've got a rather simple, mostly crud application I want to use DDD with, to learn/practice it. I wonder about aggregate design regarding a fuel tank entity. Each tank stores fill level readings (...
1 vote
2 answers
396 views

Pattern / Architecture to implement State Machine with "steps" between states

I'm looking for some guidance implementing the following problem: We have a set of 'states' which a user can enter into: 1.- Registered: A user registers themselves in the system and can start placing ...
2 votes
2 answers
242 views

Unique Checks in Aggregates vs Database

I'm new to DDD and wondering what the best practice is to handle simple unique constraints. My application allows for creation of an Item that is named by the user - and this name must be unique ...
0 votes
0 answers
161 views

DDD - Managing Relationships between Domain Aggregates

To understand DDD better, I am trying to create the Domain Layer of an online class application. I have a concept of a Student, Tutor and Session. I thought of having one aggregate called Session and ...
2 votes
2 answers
213 views

Avoid updating multiple Aggregates in Library Application

I am currently analysing the project ddd-library which is really helping in learning designing a system based on DDD principles. However there is one thing I have a problem with. In case of placing a ...
1 vote
3 answers
269 views

What are the DDD aggregates in package delivery system?

I'm trying to model a specific domain using DDD techniques and have some doubts. To better contextualize, a brief description: It's a domain of deliveries and delivery confirmation. We have two main ...
2 votes
2 answers
189 views

Child Entity or Aggregate Root?

I have to design a part of a system in responsible for creating tickets for attractions and then sell them. Basically there are three different parts: Product: to create the tickets for sale for each ...
user avatar
user161357
1 vote
5 answers
1k views

When designing aggregates, can a child entity store another aggregate root ID?

I’m currently trying DDD with establishments’ opening hours: OpeningHours is an aggregate root; it ensures its openings don’t overlap an Establishment can be set many opening hours (like summer’s, ...
4 votes
3 answers
2k views

Can two different kind of aggregates in Domain Driven Design have actually the same unique Id?

Assume that we are doing aggregate design for a ride hailing application and we have created the following aggregates: DriverAvailability aggregate, which has a value object containing the status (...
0 votes
0 answers
212 views

Event sourcing, bulk update and storing multiple events vs one event with multiple ids

Event-sourcing often implies to have one row per aggregate id : event_id event_type entity_type entity_id event_data 102 OrderCreated Order 101 {...} 103 OrderUpdated Order 101 {...} This is perfectly ...
2 votes
1 answer
438 views

Avoiding modification of multiple aggregate roots in one transaction

I'm modelling a scheduling application and wonder how it could be avoided to update multiple aggregate roots (AR) in one transaction. I understand the fundamental problem of changing multiple ARs in ...
0 votes
2 answers
621 views

What if a Repository needs to apply Business Logic to load an Aggregate?

I have an aggregate User and the user has a Score. The Score of a user is calculated by queriying a bunch of different tables and running through (often very large) result sets applying some business ...

15 30 50 per page
1
2 3 4 5
...
12

AltStyle によって変換されたページ (->オリジナル) /