domain driven design - Persisting references non-root entities outside of aggregate -
All materials on DDD specify this as not strict number, but recently came in a scenario that makes a compelling case to think.
Otherwise. Imagine 2 total roots and templates where The reason for the one reason they act as a single entry point for a group of related entities to implement their Apurwyon. They ensure that an external object can mess with these institutions and potentially violate their inventions. However, in its special scenario, even if ParamValue maintains a direct reference to TemplateParam, TemplateParam is not risk of being modified by an entity in the document total. The value associated with the parameter for a given document will be modified, but the value per parameter will not be. To make sure that this is the case, you can make template PRM an irreversible value: (in C #) So you will break due to Inveriants overall that blueprint can encapsulate with a risk Prmvalu in Tempm Peram Bahrikrn "to" Portformm. Technically it may be said that violations of the root barrier DDD, but I do not believe that as long as you "make irreversible external" unit and the object graph origin By not joining it, then it is in a spirit. template - & gt; (1: n) template, document - & gt; (1: N) Paramavlue and finally there is a reference to 2 roots
document - & gt; (N: 1) Template .
gross root barrier ParamValue should not be issued in the context of
TemplateParam , can only be referred through a fleeting reference
Template Received via gross route. Now if I want to apply a rule such as "Each paragraph of the document should mention a valid template related to the template referred to by the document owned by it". Ideally at the DB level, I have to give Paramvalue to template value in the FK, how to do it in DDD pattern ??
public square TemplateParam {private redone name string; Public TemplateParam (string name) {this.name = name; } Public string name {get {return name; }}}
Comments
Post a Comment