Steve,
My question has to do with your approach to decoupling the domain
model from data transfer objects. As I understood it, your hibernate-
mapped domain objects have relationships to other domain objects, as
the good domain model would. As you said, you might have, in the
simplest form, say, Users -> Privileges(Set). Since you have
relationship in the domain model between Users and Privileges, does
that mean that you have relationships between DTO's? Does that also
mean that whenever you retrieve User you retrieve Privilege set (lazy
or not, regardles), and effectively use Assemblers to transfer data
into DTO's? Does that mean that your user DTO has a set of Privilege
DTO's? Otherwise how else do you transfer privileges to the client?
That effectively mean that DTO's will have same relationship as domain
model objects?
Please elaborate on this subject. |