• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate Query...

 
shri mon
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to select two columns from a table.I do not have a class for that table because i only have to perform a select and no inserts.How do i do that in hibernate?


Thanks in advance.

Shrimon.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use projection:

Which will return you an Object array containing two elements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic