sondertara/joya

Hibrenate native query cause error on jdk1.8.0_212

jorinal opened this issue · 1 comments

When use native query query.unwrap(NativeQueryImpl.class) , there are exception.
com.sun.proxy.$Proxy267 cannot be cast to org.hibernate.query.internal.NativeQueryImpl, this looks like a jdk dynamic proxy error.

I fixed this issue, use the interface instead of the implementation. unwrap(org.hibernate.query.NativeQuery.class) ,and also use the @Transactional(readOnly = true) annotation to avoid use the native jdk proxy.

And please upgrade to the version 0.1.0