aspose file tools*
The moose likes Other Application Frameworks and the fly likes getHibernateTemplate support native sql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "getHibernateTemplate support native sql" Watch "getHibernateTemplate support native sql" New topic

getHibernateTemplate support native sql

Rajan Nath

Joined: Nov 27, 2007
Posts: 22
I am using spring's getHibernateTemplate().find(tmp,parms), where in tmp when I passes hql it works, but when I passes native sql it failed.
can any one pl. tell, whether this method support native sql or not. I have written query in DaoImpl only.

The query I am using contains subquery and From clause query.thows exception 'org.hibernate.hql.ast.QuerySyntaxException: unexpected token' giving location from where next select start

[ August 21, 2008: Message edited by: Rajan Nath ]
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Hibernate supports native SQL. Not sure about Spring, but I'd be very surprised if it didn't. Since this is a Spring issue, I'll move it over to a more appropriate forum.
[ August 21, 2008: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
subject: getHibernateTemplate support native sql
Similar Threads
how to query this in Spring and Hibernate
Hibernate and Triggers
HibernateException while using native sql query
Escape HQL Like special characters
Hibernate pagination performance problem