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.

Reply via email to