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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:26:11+00:00 2026-06-14T02:26:11+00:00

Does the following image (i.e. a non-navigable composition relation) makes sense in an early-stage

  • 0

Does the following image (i.e. a non-navigable composition relation) makes sense in an early-stage UML class diagram of a Domain Model?

class

I want to express that it will not be possible to do Company.Accounts, but that if the Company object is destroyed, all Accounts are to be destroyed too. My motivations are to avoid the Company class to become some kind of God-Object anti-pattern as discussed in this question. In DB terms: there’s a foreign key from Account --> Company. In the actual app, just about everything will be owned by the Company and, for performance reason, I don’t want to allow lazy/eager loading all the child collections from the Company.

I imagine the final diagram would probably have an IAccountRepository (see following image) but I find that it burdens the Class Diagram to put everything there. Imagine adding the extra infrastructure classes for each child collection. The class diagram would become unreadable!

class diagram2

How do you convey the idea in the Domain Model that loading is going to be “indirect”? Does it even go there?

Any references or industry standard on this?

Thanks.

  • 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-14T02:26:12+00:00Added an answer on June 14, 2026 at 2:26 am

    You are mixing behavioral modeling with static model. The relation you set between Company and Account is OK if Company never accesses Account directly, but if you have functions in Company that access Account, then your model is wrong.

    From what I know, there is no way to model that on the one side Company is composed of Accounts but that the accounts are actually stored in another place. Your second diagram is not correct, because if Company is composed of Accounts, then IAccountRepository should access them through Company and not directly.

    IMHO, Account should have composition from IAccountRepository to Account, association from Company to Account, and in a sequence diagram of ICompanyRepository.deleteCompany that when a company is deleted, all of it’s accounts are deleted.

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

Sidebar

Related Questions

I have the following image element that it's src does not exists. I want
EDIT: 1 The following does not work, even after clearing browser cache: .ui-state-hover {background-image:none;background-color:red;color:red;padding:50px;margin:50px;}
Why does following code snippet doesn't work? It doesn't gives any error, but also
Can any one tell me? what does following means in ruby program: obj =
I'm getting crazy with this IE 7... ==> hhttp://neu.emergent-innovation.com/ Why does following function not
I have a file transfer program. The program (Client) does following operations to send
Does the following psuedo code accomplish my goal of cleaning up after myself when
Does the following code contain a memory leak of the first three characters in
Does the following statement holds for any double (Java primitive double precision IEEE-754) except
does the following integer arithmetic property hold? (m/n)/l == m/(n*l) At first I thought

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.