0

I want to execute one query(update/delete) using hibernate template with named parameters.

I am using spring 3 hibernatetemplate.

Please tell me this asap.

1 Answers1

1

The javadoc of HibernateTemplate explains it. You should use sessionFactory.getCurrentSession() to get a session, and use the native Hibernate Session API directly.

refer this link for more info and example http://sjohn4.wordpress.com/2011/10/28/namedquery-with-hibernate-jpa-with-spring/

  • For plain Hibernate there is a section in the [Reference Guide](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/orm.html#orm-hibernate-straight). – M. Deinum Sep 23 '13 at 09:05