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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

blackcatian
This post has NOT been accepted by the mailing list yet.
This post was updated on .
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.
Loading...