I'm trying to understand the DataMapper pattern by implementing it myself for one of my domain objects.
So far, I have:
class MyDomainObject <attributes> <business logic methods> class MyDomainObjectMapper save update delete get
Now, I need get many
MyDomainObjects. These could possibly be held cached in memory (saving many calls to the database). There could also be filter conditions.
Where does this functionality go, according to the pattern? I'm not sure if I should add methods to
MyDomainObjectMapper or create a new class.