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.
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.
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/