[英]How to use hibernate template to execute query using named parameters
我想使用帶有命名參數的休眠模板執行一個查詢(更新/刪除)。
我正在使用Spring 3 HibernateTemplate。
請盡快告訴我。
HibernateTemplate的javadoc對此進行了解釋。 您應該使用sessionFactory.getCurrentSession()來獲取會話,並直接使用本機的Hibernate Session API。
請參閱此鏈接以獲取更多信息和示例http://sjohn4.wordpress.com/2011/10/28/namedquery-with-hibernate-jpa-with-spring/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.