views:

132

answers:

1

Hi All,

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

+2  A: 

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

See also

Pascal Thivent