• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mapping Hibernate domain entities to DTOs

 
Bob Lawson
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some domain entities that are mapped via hibernate. These entities contain way too much data to send over the wire, so I want to convert them to lightweight DTOs, which I will then send over. Some of the DTOs will contain other DTOs, which also correspond to a domain entity that is mapped via hibernate.

Therefore, what is the best way to convert an aggregate of domain entities into lightweight corresponding DTOs?
 
Arun Kumarr
Ranch Hand
Posts: 662
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google for these --> ResultSetTransformer, aliasToEntityBean.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!