Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1028371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:22:39+00:00 2026-05-16T12:22:39+00:00

Marked my aggregate roots with 1;2;3. Looks quite nice – almost like grapes. Thing

  • 0

alt text
Marked my aggregate roots with 1;2;3. Looks quite nice – almost like grapes.

alt text

Thing I dislike is an entity that’s marked with red arrow.

Let’s imagine that:

  • AR #1 is company
  • AR #2 is office
  • AR #3 is employee
  • Entity marked with red arrow is named Country
    • Company sets the rules from which countries it hires employees (on hiring, company.Countries.Contains(employee.Country) must be true)

I somehow see this quite unimportant part of domain (maybe it does not sound like that in this example one), and I would like to avoid promoting Country to aggregate root.

Glossary about aggregate roots says:

Transient references to the internal members can be passed out for use within a single operation only.

So – does introducing something like ‘EmployeeCountry’, removing reference to company Country and checking if Employee country matches any company country on hiring operation sounds reasonable?

Any other ideas?

How can I get my grapes look like they should?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:22:40+00:00Added an answer on May 16, 2026 at 12:22 pm

    In this context Country is just a value object, not an entity – much less an aggregate root – so there’s no reason to change anything about your design (without more information).

    Additionally, note that the warning you cite pertains to internal members of aggregate roots, not aggregates themselves. There’s nothing wrong with maintaining references to aggregates in multiple places. Aggregate roots are supposed to encapsulate child objects so that there’s a single place to enforce business rules for related objects.

    You can see this clearly in several places in Evans’ “Domain-Driven Design” (a.k.a., “The Blue Book“). For example, see the diagram on page 127 (in the introduction to aggregate roots), which shows a Car aggregate that has a reference to an Engine aggregate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function that looks like this: def post_count(self): return self.thread_set.aggregate(num_posts=Count('post'))['num_posts'] I only
I have a query that looks like the following SELECT t1.Name, t2.ID, t2.name FROM
I have some files in SVN marked ! filename That I would just like
I have a slider that's marked up like so: <div class=slider wide> //slider html
Note: This question was marked as solved once, but it figured out that upgrading
I have some interface that is marked as a [ServiceContract] for WCF service. But
I have a class which I marked as [Serializable] that I'm trying to copy
Before I get marked as dupe of articles like: [http://stackoverflow.com/questions/635123/what-is-a-good-tool-or-site-to-use-to-performance-test-a-web-page-site][1] Most of the answers
I have lots of text marked up like this: <span class=section>[<a href=blablabla>Section</a>]</span> I need
I need to access some members marked internal that are declared in a third

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.