• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DTO Assembler pattern

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using the DTO Assembler pattern in my project to copy data from DTO to hibernate entities and vice versa.
When I copy values no problem. The problem arises when I have to establish relations based on the ID (from FKs) that represent
relationships within the DTO. This makes the DTOAssembler methods have to be transactionals and that also have to inject
DAOs within DTO Assembler,is it a good practice?. The other option would be to copy only primitive values
within the DTO Assembler and establish relationships within the Services, there are transactional and use DAOs.
reply
    Bookmark Topic Watch Topic
  • New Topic