Beginner |
|
Joined: Tue Aug 17, 2004 5:06 am Posts: 46
|
I am having a hard time with those CGLIB proxies.
For some reason my Hibernate beans must implement a business interface that forces them to use interfaces as the result type on all many-to-one and one-to-one associations. Thus the CGLIB generated interfaces only implement these interfaces but they don't inherit from the proxies object (that's clear because CGLIB can't guess the implementation class).
Unfortunately when I try to access such proxied object with session.get() I still get the proxy object, resulting in ClassCastExceptions later. Is there any way (besides flushing the whole cache...) to replace a proxy with a real object ?
I.e. something like Hibernate.initialize(myProxy) that replaces the cached object.
|
|