Re: Repositories Global only or contextual?
Caleb Cushing <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAAHKNRE2fmKYeQG5=JB5OXLJR-CapXS4Eyf=homO5HEb1uLNyw@mail.gmail.com> |
On Mon, Jan 20, 2014 at 11:45 AM, Thomas Presthus <[email protected]> wrote: > know anything about sessions and other mechanics for user management, > I'd recommend doing something like: > > class Tasks { > Set<Task> getTasksBelongingTo(User user) { ... } > } It would seem though, assuming a user could have a /lot/ of tasks, that I would end up writing another implementation class as a set that then has to know how to fetch from the database, because the Set returned would have to be able to lazy load Tasks. -- Caleb Cushing http://xenoterracide.com Calendar: https://www.google.com/calendar/embed?src=xenoterracide%40gmail.com&ctz=America/Chicago ------------------------------------ Yahoo Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/domaindrivendesign/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/domaindrivendesign/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo Groups is subject to: http://info.yahoo.com/legal/us/yahoo/utos/terms/