hi all,
just to remeber:
http://forum.hibernate.org/viewtopic.ph ... hlight=dto
in my case the problem is about the project organisation.
In my society we start thinking the UI layer with users (clients), so when all is validated, we have the jsp but no domain model (it comes later).
The development team may sometimes start coding jsp before having a domain model. For this we need DTO (not to rework all the jsp when domain model is validated).
I know this is not the best project organisation, but we must do with it.
We have coded a PojoDTOCopier.
The idea is pretty simple and based on DynaBean.
We have another mapping file set in which we find
DTO.property = Pojo.property
It can support complex graph of objects since it has partially the same structure as an hbm file.
We're gonna bench this solution and compare both static pojo and dynamic pojo solution with loadrunner.
What is sure is that static or dynamic DTO is hell to manage and is not a code reuse since it is linked to the ui.
Anthony