May I ask why it's not possible to special case generic return types in the ProxyMethodHandler? IMO this is a bug/oversight. Having to wrap the bean so that the returned instance from EntityManager#unwrap is unequal to the contextual instance just to satisfy this check seems like an overkill.
|