Using Hibernate and Jdbc both in Spring Framework 3.0

前端 未结 2 1402
天涯浪人
天涯浪人 2021-01-01 05:42

I am working on a project which uses Spring 3.0, hibernate 3.0. My project has Controller, Service and DAO layers. Daos(written in hibernate) are accessed from service layer

2条回答
  •  再見小時候
    2021-01-01 06:11

    I am writing this answer in hope that people will improve mine answer as this may not be the best answer so please comment.

    In hibernate you can use named native query example : http://www.java2s.com/Code/Java/JPA/UsingNamedNativeQuery.htm Scroll a little bit down and find File: Professor.java You can use this example. This way you can fire native queries from hibernate.

提交回复
热议问题