CSF-Software-Development/Patterns.DDD — Issue #1: Add support for repository read strategies
Author: craigfowler
Created: 2012-01-25 10:49:48+00:00
State: open

Some supported repository provides (NHibernate specifically) can provide strategies/policies for how objects are read from the repository. For example, NHibernate can provide all-at-once loading of entities or on-demand loading.

What can be done here is to provide either some kind of enumeration or a small object model (perhaps a singleton with many properties, similar to fluent nhibernate) that will help abstract these strategies.

Repository implementations are free to ignore the strategies where provided to them (they are really more like hints as to how the developer would like the repository read to occur, rather than directives which much be followed) but repositories that can provide them should do so.