开发者

JPA native query and cache

开发者 https://www.devze.com 2023-01-08 03:49 出处:网络
Does native query i开发者_StackOverflow中文版n JPA (createNativeQuery) supports caching? I am filling my own data transfer object because the sql query joins several tables and takes only several colu

Does native query i开发者_StackOverflow中文版n JPA (createNativeQuery) supports caching?

I am filling my own data transfer object because the sql query joins several tables and takes only several columns form them.

Regards


This is possible but you must use an explicit .addScalar or .addEntity.

See also

  • Caching SQL query problem
  • Hibernate: Truly Understanding the Second-Level and Query Caches
0

精彩评论

暂无评论...
验证码 换一张
取 消