File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: getHibernateTemplate support native sql
It's not a secret anymore!