Hello there! From an enhanced persistent class, how can I find the name of the original object, not the proxied? I mean, I tried this:
Class clazz = target.getClass(); Object destination = clazz.newInstance();
Problem is, that target is something like this: com.acme.model.User$EnhancerByCGLIB$$1db5f89 I just like to get the User class, not the enhanced one. Is there a clean way to do this (I always can manipulate the string from target.getClass().getName() and use Class.forName()...) ??
posted 11 years ago
No clue it this will work but you might as well give it a go: