File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

escaping SQL keywords in hibernate

 
Chandra shekar M
Ranch Hand
Posts: 162
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a hibernate foruma like this.
<formula>
(select listagg(size,',') WITHIN group (order by size) from (select distinct(size) from a where id = 10 ))
</formula>

Hibernate is not identify WITHIN as keyword instead it prefixs it with table a alias to avoid this i wrote it like
<formula>
(select listagg(size,',') 'WITHIN' group (order by size) from (select distinct(size) from a where id = 10 ))
</formula>

Hibernate will not prefix the table alias instead it will be 'WITHIN' in the final query and SQL fails saying missing WITHIN keyword. How to pass WITHIN
to final sql?

Thanks
Chandra
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic