tags:

views:

204

answers:

1

When implementing the DataMapper pattern, should the class model that I implement in the DataMapper package more closely resemble the domain model or the data model?

+1  A: 

The whole point of a datamapper is to make the mapping transparent. So you class should be constructed on the terms of the object model. The gory details of mapping it back/forth from the storage (be it database or otherwise), resides in the mapper.

troelskn