Hello Hector,
Is there a reason you don't want to go with a static identity map?
Well, I consider usage of static map in this case most simple and even correct.
But as I'm in the planning phase and always questioning the design, I
want to make sure I'm doing it the correct way. And after
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
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
Hello Benjamin,
thank you... but either I can't follow, or I must not have described
properly the question. Because I do not understand how the factory could
help you to share the map, unless you do not share the factory then...
Example:
class MapperFactory
{
protected $_identityMap;
Marian,
A static identity map is the way to go. Page 291 of Php objects, patterns,
and
practicehttp://books.google.com/books?id=qVLjFk_4zVYClpg=PA487dq=ebook%20php%205%20objects%20patterns%20practicepg=PA291#v=onepageq=f=falseby
Matt Zandstra demonstrates how to build a simple but effective