• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate SQL query column alias

 
Gina vernon
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is there anyway to provide column aliases in hibernate, such as:




From the documentation it seems that only placeholders for column aliases can be provided and Hibernate then provides its own aliases. Is my understanding right?

Thanks.
 
Henrique Ordine
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can, but if A is a column in the Table table, then you need to do something like this:

Select t.A as B from table as t
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic