How to convert Mybatis Javassist proxies object to source object(unproxy object)?

我与影子孤独终老i 提交于 2019-12-07 23:55:55

问题


Mybatis excute sql and return a Javassist proxies object.

I want to convert Javassist proxies object to source object.

Since sometimes I don't want to pass the proxy object in my code(It will cause association SQL when other framework reflect the object). I want to use the source object(with no proxy).

for example: select * from user where id = 1;

Mybatis return an Object type : User$$_jvstec7_0@a5843b

But I want to convert it to unproxy object: User@c5641a

How can I get an unproxy object without set every member field in object?

Thanks in advance.

来源:https://stackoverflow.com/questions/45478650/how-to-convert-mybatis-javassist-proxies-object-to-source-objectunproxy-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!