Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

DDD: Value Object with Id

I have a question regarding whether or not 1 of my "classes" in my DDD Test Aggregate constitute a value object or a entity. Lets say I had 2 aggregates: TestDefinition Test Test contains ...
Murdock's user avatar
  • 4,572
0 votes
0 answers
43 views

ETL design over an existing DDD aggregate

I hope you can help me with the design of a data ingestion process. Currently, I have an existing aggregate called ExperiencePricing and an existing command called SetExperiencePricingCommand. The ...
Gianpolo's user avatar
  • 966
0 votes
0 answers
61 views

Domain driven design for nested aggregate

Currently I'm building a project with DDD about food store. The description pretty simple, the user can create his own store. Each store has foods and each food has several food options. The user can ...
dark deep's user avatar
1 vote
2 answers
123 views

DDD: Can an Entity be also an Aggregate?

I'm approaching DDD and I'm in trouble with a (very common, I suppose...) use case where a hierarchy of related objects is involved. Let's imagine modeling a Software Product made of many Modules ...
javacomelava's user avatar
0 votes
0 answers
46 views

If Aggregate Root needs to check the database, can it have the injection?

public class Lead : FullCompanyEntity<int>, IAggregateRoot { private string? _phone; private string? _email; private Address? _address; public int RecordKeeperId { get; private ...
notcontrol's user avatar
0 votes
0 answers
31 views

DDD: How do I define my bounded contexts for a junction table shared by two aggregate roots?

I am puzzling over what seems to be a simple enough problem related to the boundaries of my Aggregates in a Domain-Driven Design project. I have prepared a SQL Server database called 'AuthDB' with ...
SameOldJets's user avatar
1 vote
1 answer
75 views

How to split large time-related aggregates in DDD?

I am running into the following design problem, for which I haven't been able to find a satisfactory solution. Any guidance is welcome. Consider a notion of route for a vehicle, where a route is a ...
fchauvel's user avatar
  • 1,003
0 votes
1 answer
21 views

Domain driven design: How to add a new database entry for an Aggregate?

In Domain Driven Design, what is the best way to create the database entry when a new object is created inside an Aggregate? As an example, consider a Student entity representing a student at a ...
Elias Schoof's user avatar
  • 1,966
0 votes
0 answers
25 views

Integrate a versioning in aggregate

I want to integrate a version field into my aggregate for the consistency and integrity of my data. I would like to have feedback on the different implementation and architecture knowing that I do not ...
sayah imad's user avatar
  • 1,543
0 votes
0 answers
61 views

Problem defining DDD Aggregates and Entities

I am working in a project that involves lots of requirements, conditions and entities so we are thinking about refactoring into Domain Driven Design architecture but we are struggling with the Entity ...
nacho gonzalez's user avatar
0 votes
0 answers
39 views

DDD tactical design for a lesson booking system, too many aggregate roots?

suppose to have an domain where you can book either private lessons with a teacher, or apply to a specific collective course. Every course has its own pricelist, but the pricelist for the private ...
Kiske1's user avatar
  • 413
0 votes
0 answers
49 views

Determining Aggregate Roots In Shipping/Receiving Domain

I am in a bit of analysis paralysis trying to work out my domain and aggregate roots. I have a shipping/receiving and warehousing domain that will eventually expand into a larger erp system for ...
shreddish's user avatar
  • 1,674
0 votes
1 answer
117 views

Validation in DDD requiring data from distinct bounded contexts

I'm quite new to DDD and I need to get something straight. It's asked many times but I never found a satisfying fits-all answer. The question is: How to validate an aggregate requiring data from ...
cyrix's user avatar
  • 29
1 vote
1 answer
361 views

DDD, creating domain object that depends on Ids from the persistence layer

I'm delving into Domain-Driven Design (DDD) and encountered a scenario that seems like a typical challenge. It revolves around creating domain objects, such as Aggregates, that depend on IDs which are ...
Fawwaz's user avatar
  • 56
0 votes
0 answers
85 views

Designing DDD aggregates for pairing mechanism

I'm developing an application following Domain-Driven Design (DDD) principles, and I need help modeling the following requirements: Main Purpose: An application to control sound Players (Speaker) ...
sharonooo's user avatar
  • 694
2 votes
1 answer
375 views

DDD one to many relation between aggregate root

I am trying to model a domain for the backend of my app. In my domain, I have Cook aggregate root and every cook will have an Ethnicity. If we think in presistence layer ethnicity and cook has one to ...
jaskaranjit singh's user avatar
1 vote
2 answers
258 views

DDD: Different aggregates of the same domain model per usecase. Is there a way?

I'm pretty new to DDD. Please, correct me if I'm wrong at any point. Thanks. Long story short - performance optimization (at least) Consider the following example: Let's say we have an order domain ...
don-nv's user avatar
  • 11
1 vote
1 answer
300 views

How to update related entity in clean architecture

my problem is about updating an entity related with the aggregate root. I have a Shipping class and my command is SetShipmentAsDelivered. Shipment has a relation with the Order class. So when the ...
Koray Asilioglu's user avatar
1 vote
1 answer
122 views

Correct aggregate roots in appointment scheduling application

I'm working on an application where one of the modules is responsible for scheduling appointments. I have some problems with creating correct aggregate roots. There are DailySchedules where the owner ...
swch's user avatar
  • 1,466
0 votes
1 answer
277 views

Domain Driven Design - modeling user registration process .NET Core

I am learning DDD and try to model user registration process using domain driven design. Lets imagine a dinner hosting system where Host and Guest are two entities. The host will be the one that will ...
Tisha Anand's user avatar
0 votes
1 answer
108 views

Aggregate Root references collection of aggregate roots

I've been learning about DDD and just wanted to make sure I understood something correctly. I've read in various places that aggregate roots properties should not directly reference entities from ...
MyUsername112358's user avatar
0 votes
1 answer
40 views

How to model and maintain invariants across aggregates in a Domain-Driven Design for a payment and refund system?

I'm working on a payment system where payments can be split among multiple payees. Additionally, we have refunds, which also can be split among these payees. I have some business rules that need to be ...
Kainar Masujima's user avatar
0 votes
1 answer
226 views

How can I replace `Id` field of Entity class to DomainEntityName+Id field of a domain class in Clean Architecture?

I am working on an application that uses Clean Architecture in .net core. The domain entities are inherited from AggregateRoot which is further inherited with the Entity class. This entity class has ...
Imran Yaseen's user avatar
0 votes
0 answers
113 views

How to use one table in two aggregate roots

I am fresh in DDD, and i faced with next issue. I have value object public record Operation(string Name, string Value); and two aggregate roots which have this operation in one context public record ...
Pal's user avatar
  • 1
2 votes
0 answers
2k views

DDD - where to put entity/contract/DTO mappings?

I have an API with response and request contracts (DocumentRequest/DocumentResponse), a domain object (Document), and dtos (DocumentDTO). I have to map the requestContract -> domain object -> ...
Trevor's user avatar
  • 131
0 votes
2 answers
1k views

Is it okay to say that entity with one to one relation with aggregate root is not possible in DDD? instead it is a value object or aggregate root?

I am almost new to DDD, i have read books and watch pluralsight video from Steve Smith and Julie Lerman. I am quite confident that i understood the concepts except couple of things that stucked in my ...
Can Günaydın's user avatar
0 votes
2 answers
605 views

DDD - Is it alright to change one aggregate and save another one in the same transaction?

My aggregates are: Customer who has multiple Discounts which are invalidated if used during ordering Order which has to be modified if customer who places it has specific discount My problem is that ...
Mike's user avatar
  • 922
1 vote
0 answers
239 views

DDD - Aggregate inheritance vs composition, how to correctly design this situation?

I'm working on a PIM system. There is one Aggregate root Product which has attribute, productType (Meal, Grocery),name, image etc.. but as you know some product types as pharmacy are coming to our ...
Emre Tiryaki's user avatar
0 votes
1 answer
166 views

DDD Aggregate needs info from another aggregate

i'm stuck with this problem while designing aggregates in a DDD project. Please consider the following scenario: public abstract class BaseAppType{ public abstract int GetUserOwnerId(); public List&...
Ale's user avatar
  • 43
0 votes
1 answer
154 views

Can an aggregate have lite version of another aggregate just for read?

I have an order aggregate with Order as root having multiple OrderLine. OrderLine has "identity reference" to Product aggregate. But having only "identity reference" is not enough. ...
Saeed's user avatar
  • 195
0 votes
0 answers
32 views

How to ensure child entities only have query methods in an aggregate

I have been reading things about DDD, aggregates and entities and a doubt has come up. Let's say I have the following entity: class AnEntity: name: str # command / ...
Antonio Gamiz Delgado's user avatar
1 vote
2 answers
1k views

Can DDD repositories return data from other aggregate roots?

I'm having trouble getting my head around how to use the repository pattern with a more complex object model. Say I have two aggregate roots Student and Class. Each student may be enrolled in any ...
Eric Anastas's user avatar
  • 22.1k
0 votes
1 answer
120 views

Is this leaking domain knowledge to service layer?

Currently, my service layer handles loading aggregate roots that are responsible to react to some domain events. This involves calling the persistence layer to filter and load the responsible ...
geeko's user avatar
  • 2,840
0 votes
0 answers
88 views

Sorting self-referencing aggregate roots

I'm using Domain-Driven Design and CQRS on my project and I have a self-referencing aggregate root to model a hierarchical structure: Category CategoryId $id CategoryName $name ?CategoryId $...
David's user avatar
  • 533
1 vote
0 answers
147 views

DDD How to Avoid Aggregate Root with 3 Level Children who has lots of invariants between each other, is this correct design or am i totally lost?

I am new to Domain Driven Design, I have read Van Vaughn DDD book and I am trying to refactor my project according to DDD rules. So here is my design for my aggregate roots and entities that I have ...
Can Günaydın's user avatar
0 votes
1 answer
71 views

How can I optimize aggregate modificiations for concurrency access?

I am wondering whether it is good (and possible practice) to split one piece of data (property?) into two aggregates. Let's consider the following example: There are Debt, Description and Tag ...
Lepruz's user avatar
  • 31
1 vote
1 answer
346 views

Strategy for updating huge entity's collection that belongs to Aggregate Root

I'm stuck with a specific scenario regarding Aggregates and not breaking business invariants. I've two entities, let's call them Order and OrderItem. Both entities belong to an aggregate with Order as ...
Alex29's user avatar
  • 1,241
0 votes
1 answer
157 views

Modeling a many to many relationship to a DDD aggregate

Trying to understand how this can be modeled without breaking DDD rules. This is a system for managing and sending Gift Cards to Customers Customer ------- CustomerId (Primary Key) CustomerType ...
Peter L's user avatar
  • 25
2 votes
1 answer
2k views

How to generate entities and aggregate roots Id in DDD

Let's assume we have an application written using DDD approach. Also, entities and aggregate roots are stored in the database using an incremental identity integer as primary key. As entities are ...
Fede's user avatar
  • 864
1 vote
1 answer
429 views

What rules to follow when designing aggragates in DDD?

I am re-designing my side-project to utilize DDD. I am doing this for learning purposes. It's an application for planning home budget and analysis of spendings. One of functionalities of the app is ...
Bladositto's user avatar
1 vote
2 answers
1k views

Aggregate roots in DDD

I have registration form where user can input username and password and also create company at the same time(or chose one of existing companies). User have multiple companies and company have multiple ...
georgeospawn's user avatar
3 votes
2 answers
709 views

Should duplicate values in aggregate roots be checked in the domain layer or the application layer?

I am new to DDD, and I have ran into a problem with unique constraints. I have a problem where one of the fields (a value object) on my aggregate root cannot be a duplicate value. For example, a user ...
Woutenator's user avatar
0 votes
1 answer
686 views

How to Design Aggregate Root properly

I'm new to DDD patterns and I don't know how to identify my aggregate root properly There is a part of my project that deals with attachments so there are two classes Attachment and AttachmentType ...
Merna Mustafa's user avatar
0 votes
1 answer
112 views

Reference between aggregates with write model constraint

I know there are lots of questions talking about aggregates references here. But after reading some of them I still do not get an answer. First I will describe my business logic. I have two Entities: ...
aisensiy's user avatar
  • 1,510
1 vote
1 answer
800 views

Domain-driven Design: Aggregate root property is a collection of other aggregate roots

In my domain model I've got two principal entities: User and Event, both which I've decided to make aggregate roots. Users and Events have a one-to-many relationship wherein Users can create several ...
Charybdis's user avatar
1 vote
1 answer
555 views

Manually mapping model to database - Spring Data JDBC

I have the following (vastly simplified) domain object public class Student { private Long studentId; private List<Appointment> appointments; // Business logic } public class ...
navix1337's user avatar
-2 votes
1 answer
78 views

Several Domain Drive Design questions

Lately I am trying to learn DDD and I am working on a test project. I have a few questions conserning my code. I just want to clarify that the meantions of Event in this code snippet refer to concerts,...
Konstantin Konstantinov's user avatar
0 votes
1 answer
216 views

DDD - Aggregate context, consistency

I am trying to design a project management system students. Basically there is a given period of time in which a project has to be finished by students. Generally, students need to work on the project ...
navix1337's user avatar
0 votes
1 answer
70 views

Should invariants be unit tested both in the application service and the aggregate root?

I got multiple value objects (VOs) inside my aggregate root (AR). Each VO does invariant checks when created, such as string min/max length, regexp, etc. Each VO is created when the AR is created and ...
Andrea Damiani's user avatar
0 votes
1 answer
203 views

Domain Driven Design - How does a reconstitution factory bypass invariants?

I'm having some difficulties figuring out how a reconstitution factory works when paired with DDD. From what I understand, this factory would be owned by the repository layer (or rather, not the ...
Nick N's user avatar
  • 59

1
2 3 4 5
10