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 8760141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:58:18+00:00 2026-06-13T14:58:18+00:00

I am confused about aggregate objects and that only aggregate objects have repositories because

  • 0

I am confused about aggregate objects and that only aggregate objects have repositories because I don’t know how to properly code it.

Assume that you have a User, Question and QuestionLog entity. I don’t understand how to set the boundaries for how much you should put in an aggregate object. You could say that no questions would live in my system without a user, and a questionlog would not exist if it had no questions to be attached to. So would user be an aggregate root?

How would you add a questionlog then for instance?
For me it seems like you end up with a lot of nesting etc. User.addQuestionLog? I don’t understand where the boundaries go for when it should be an aggregate and seen as a unit? For me it would be more natural that User is one aggregate and Question is another. However I don’t understand how to actually know this.

And a question can have categories too, would the category also be a part of question or not? Why/why not? How to spot them?

  • 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-06-13T14:58:19+00:00Added an answer on June 13, 2026 at 2:58 pm

    Don’t think of the objects, DDD is all about real life.

    The real questions are:

    • Can X exist whithout Y?
    • Is Y a part of X?

    Hence:

    • Can a user exist without a question? Yes
    • Should the question still be available if the user quits? Yes
    • Is a log part of a user? No
    • Is a log part of a question? No (since it belongs to users, but is not part of a user)
    • Is a category part of a question? Typically yes

    So we end up with three root aggregates.

    The category is value object

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

Sidebar

Related Questions

Very confused about this one. This code in views.py works, but only when I'm
I am a little confused about Accept-Encoding . I have Web Service which would
I'm a little confused about the HTTP protocol, from what i know HTTP was
I am confused about why this code says JPEG files and PNG files are
I'm confused about how defun macro works, because (defun x () hello) will create
I'm confused about the code example at the end of the resolve documentation (test
I am confused about the a concept here. I read on many tutorials that
I am confused about default values for PHP functions. Say I have a function
I am a bit confused about the size of icon that appears in app
I am somewhat confused about when to use group(), aggregate with $group or mapreduce.

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.