• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get data from alias

 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a query need to get the score from the text search, since the score is just in the select statement, it is not part of the table columns?

Then I have a hibernate.hbm.xml

Then in my hibernateDAO
[code]
SQLquery query = session.createSQLQuery("select tableA.*, score(1) from tableA where contains (location, 'string', 1) > 0")
.addEntity(TableA.class);
[code]

It works but the score is NULL, how do I get the score back, I try to use the addScalar but It is not working

Thanks in advance if you can help!!!
 
jay lai
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI, can anyone please help, I really need this to be resolve

basically, I do a
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic