In my opinion,
- A repository acts like a collection object which returns or operates a list of domain objects according to a criteria input.
- A data mapper acts as a middle layer between database and the domain layer to hide the persistence implementation (such as SQL statements).
- A data access object is a common interface of the whole persistence layer.
I think since the implementation of a data access object has a repository, and the implementation of the repository has a data mapper and sometimes a identity map to make the domain object unique, Is it correct to say that they work collaboratively? Or they are completely difference patterns that do not work with each other?