Home > Back-end >  Using nativeQuery. Unwrap (NativeQueryImpl. Class), abnormal in dubbo call times
Using nativeQuery. Unwrap (NativeQueryImpl. Class), abnormal in dubbo call times

Time:12-02

Code:

Query nativeQuery=entityManager. CreateNativeQuery (querySql. ToString ());


NativeQueryImplementor NativeQueryImplementor=nativeQuery. Unwrap (NativeQueryImpl. Class)
SetResultTransformer (Transformers. ALIAS_TO_ENTITY_MAP);


Exception: com. Sun. Proxy. $Proxy313 always be cast to org. Hibernate. Query. Internal. NativeQueryImpl

Not a restfull sure, dubbo calls, the great god help have a look, give a solution, urgent!!!!!!!!!!!!!!!!!!!!!!!!!!!!

CodePudding user response:

@ Transactional (readOnly=true)
Public class...
  • Related