About Martin Fowler's Data Mapper pattern
As mentioned in his book, Data Mapper is a layer to hide database access from domain objects. It also recommended that data mapper shouldn't be exposed to domain layer.
However, as I've experienced, most of my domain logic involves database access so I have to expose my data mapper to domain layer.
I know that I can make interfaces to avoid referencing data mapper directly, but it doesn't make sense to me. If you have a DataMapper with "void updateData()" method, why whould you make an interface with "void updateData()" and get the DataMapper to implement this interface? I think it's totally unnecessary. Could someone comment on this?
So my conclusion is that data mapper can't be hiddent from domain logics (in most cases). right?