• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how i get i single vlaue

 
madhuchilipi reddy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
i have table madhu.in this table columns are
sno sname
1 nadg
2 sdd
3 dd
this is my table i want to get the value only with using hql.
and that value put into one string but it will not possible .how to store that getting value.
 
Halcon Guatemala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi madhuchilipi, do you want to retrieve your entire table content inside one resultset? or you want to retrieve a single value inside your string?

Thanks
 
David Madouros
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming you want the value of 'sname' as a String and that it is mapped as a string in a class named Madhu...



Hope this helps.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For you example, you can always create a custom UserType. That way when it loads from the database you can concatenate it all, and when you go to save, you can undo the concatenation.

But you will need to go to the Hibernate website to see how that is done. Too much to type in a thread.

Good Luck

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic