• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate - getting only some attributes from a table into Hibernate Java Object.

 
Mag Wells
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is an interesting article - http://www.javalobby.org/articles/hibernate-query-101/ that tells how to select only some attributes from a table and populate in the java object. However, my concern is more about where
do I put this class ? Should I make it a base class and if needed the other classes might extend it ? or do I need to tie in these methods to the DAO classes ?
 
Mag Wells
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one more issue with that code - i.e. how does it know the type of the Java Object that the query returns !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic