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
1
vote
1 answer

Using aggregates and Domain events with nosql storage

I'm wandering on DDD and NoSql field actually. I have a doubt now: i need to produce events from the aggregate and i would like to use a NoSql storage. But how can i be sure that events are saved on the storage AND the changes on the aggregate root…
1
vote
1 answer

Implement sorting/filtering business logic into DDD aggregates

I am fairly new to DDD and for me I search in practical terms to a good function for an aggregate. I have a long list of users (User) and a create an aggregate (UserAggregate) for that. Now in my view I might display users based on different…
Jurian Sluiman
  • 13,498
  • 3
  • 67
  • 99
1
vote
1 answer

Aggregates that require sharing of an entity

Consider my scenario of a model consisting of two aggregate roots, Customer and Order as well as a "shared" entity Address. Also note that Address is abstract has the following subclasses: PhysicalAddress, PostOfficeBoxAddress and…
1
vote
1 answer

aggregate root design and size

I know there are a million questions like this. I'm sorry. I think mine is different but it may not seems so. I am new to DDD and trying to get a grip. Part of my domain is like this. Location 1-* Field Field 1-* Event Field 1-* Task Task -…
Raif
  • 8,641
  • 13
  • 45
  • 56
0
votes
2 answers

How to implement Aggregate Root repository an add child entity with EF

I'm developing an MVC application. I have a Domain Model, and I use a repositry pattern for data access and Entity Framework Code First. I also have a UnitOfWork class which I call the repository operations through. My problem mainly arises when I…
0
votes
0 answers

Aggregate root updated when child modified

I'm using EF 4.2 where the relevant bits look like: public class MyDbContext : DbContext { public IDbSet Users { get; set; } public IDbSet Memberships { get; set; } } public User() { public…
Robert Roe
  • 122
  • 9
0
votes
1 answer

NHibernate - drilling down from the aggregrate root

Given an aggregate root X, which has many Y, and Y which has many Z... How can I drill down through the associations and select only those X's whose Z's have a certain property value? IList Xs = Session.CreateCriteria(typeof(X)) …
Gary Hall
0
votes
2 answers

Domain Driven Design - Aggregate Root design issue

I am currently refactoring a system. I've got the following situation: The system is about providing information about companies across several business sectors. Each company can be active in one or more sectors. Companies can be participating in…
Chris
  • 7,229
  • 7
  • 41
  • 57
0
votes
2 answers

Networks: how to model them using aggregate roots?

A domain model defines a.o. the relationships between entities and we define aggregate roots to provide encapsulation and transaction boundaries. The well known relationships are one-to-one relationships (an entity or value object is contained…
0
votes
2 answers

DDD and authorization - dependent objects as aggregate roots?

I wonder whether I should model dependent objects as aggregate roots. Let's say I have a TaskList and this list has Tasks. A Task cannot exist without a TaskList but it can be viewed and edited separately. There are no special conditions that the…
deamon
  • 89,107
  • 111
  • 320
  • 448
0
votes
1 answer

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 other aggregate roots. So let's say we have 2…
MyUsername112358
  • 1,320
  • 14
  • 39
0
votes
1 answer

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 enforced: The sum of payment splits should not…
0
votes
0 answers

How to take input while trying to update an Aggregate Root?

I am trying to build a Kanban Board app using .NET core for backend. I lernt that in DDD there are aggregate roots that manages a transaction at db. Only aggregates can have repositories and entities under aggregate roots fetched from db with…
0
votes
1 answer

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 Id field which means I now have Id in all my…
0
votes
0 answers

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 Doctor(string Name, Operation Operation); public…