hello, If you dont instantiate your mappers through a factory you probably will have lots of work to do if you dont make access to the identity map global via a static method.
greetings, Benjamin On Sunday 30 August 2009 04:58:32 pm Marian Meres wrote: > Hi All, > > I have many domain models where each has its own data mapper. These > mappers are spread across many places as a) services use mappers, b) > mapper x uses mapper y, c) and even models use mappers (only in the > case of lazy loading). > > I want mappers to utilize the identity map pattern (which is itself > pretty straightforward). I guess the whole pattern makes more sense > when used as a shared map across the mappers rather than for each to > have its own. > > Since the mappers usage (and instantiation) is wide spread (at least > in my case), the only solution I could think of is always a sort of a > static one (either through static members, or static "managers", or > even some injectable containers which default to static > Zend_Registry). > > What would you suggest, other than the static way? > > Thank you in advance. > > M. -- Benjamin Eberlei http://www.beberlei.de
