开发者

stackoverflow tag problem Vo or entity or seperate root agg

In the context of domain driven design, tag in stackoverflow is value type, see below link discussion.

DDD: SO tag. An Entity or value type?

But if it is value type then in future if开发者_如何学Python any one wants to create new tag, how will he perform that ?

in my project is also there is tag which is associated with an advertisement entity, 1 to many, but if i consider tag as a value type and in future if i want to add new tag in data base . How would i do that, because tag is VO. while creating advertisement i can only assign existing tag to a new advertisement , but how will i create new tag?


In the context of the list of possible tags, tag is an entity.

A tag as applied to a question is a value type. In fact, it's not even a class from the order's perspective - it's really just a string.


Tag is an entity. It has conceptual identity, please see my answer. You create it just like you create any other entities.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜