开发者

stackoverflow tag problem Vo or entity or seperate root agg

开发者 https://www.devze.com 2023-02-08 17:34 出处:网络
In the context of domain driven design, tag in stackoverflow is value type, see below link discussion.

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

精彩评论

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