domain driven design - Saving an entity to an aggregate root -


i have 2 repositories in current system -- form , entry (basically content created submitting form). entry can't exist without form. in case, assume form aggregate root.

i'm asking myself if can rid of entry repository , use form repository instead.

class formrepository {     public function getentrybyid($entryid)     {         // returns entry form     }      public function addentry(entry $entry)     {         // here's problem     } } 

let's have 2 forms , few thousands of entries , i'm using nosql. when use addentry, should save form?

  • should create form document add entries same document since form aggregate root?

  • am allowed create new document each entries , make clear form aggregate root in code?


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -