createNativeQuery
时间: 2023-09-12 20:06:12 浏览: 122
createNativeQuery方法是JPA中的一个方法,用于创建一个基于本地SQL语句的查询。这个方法可以直接执行原生的SQL语句,并且返回结果可以直接映射到实体Bean中,无需进行强制转换。使用createNativeQuery方法可以方便地执行复杂的SQL查询操作,同时还可以充分发挥SQL的强大功能。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [JPA 实现SQL和HQL语句查询(createQuery()、createNativeQuery())](https://blog.csdn.net/qq_38974638/article/details/113142263)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [hibernate将本地SQL查询结果封装成对象(最终)](https://download.csdn.net/download/sourcefour/4286554)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文