darpet
darpet

Reputation: 3131

JPA native query and cache

Does native query in 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

Upvotes: 6

Views: 9163

Answers (1)

Pascal Thivent
Pascal Thivent

Reputation: 570285

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

See also

Upvotes: 6

Related Questions