两个实体之间的两个(或多个)聚合关系 [英] Two (or more) aggregation relationships between two entities

查看:388
本文介绍了两个实体之间的两个(或多个)聚合关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请考虑以下(抽象)情况:

Consider the following (abstract) situation:

两个实体。两个实体之间存在两种聚合关系。

Two entities. There are two aggregation relationships between the two entities.

该图如下所示:

我知道这听起来有些含糊,但是在那里这幅画有什么问题吗?

I know this might sound vague, but is there anything wrong with this picture?

我的意思是,这种设计是否可能会出现(明显的)问题?

I mean, are there any (obvious) problems that could arise from this kind of design?

或者我是偏执狂,两个实体之间的两个(或多个)聚合关系绝对没有错吗?

Or am I being paranoid and there's absolutely nothing wrong with two (or more) aggregation relationships between two entities?

推荐答案

<对我来说,这种设计没有错。
您的Entity2在每种情况下都将扮演不同的角色。

For me there is nothing wrong in such design. Your Entity2 will have a different role in each context that's all.

这篇关于两个实体之间的两个(或多个)聚合关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆