Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Frankie Adams   on Oct 22 In Java Category.

  
Question Answered By: Milind Mishra   on Oct 22

All DTOs cannot be built from database.
But if you mean domain object or entity objects, yes, Hibernate has a tool(Search for it in google).
You can use domain objects as DTOs and inside DTOs.
For the projects that need high reusablity at the domain objects, it is bad practice to produce objects from database. You need to design your domain objects and then map them to a persistence tier if you need to persist them.
But if you have a big legacy system it could be a good approach.

Share: