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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -