-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Initializing proxies
PostPosted: Sun Oct 24, 2004 4:30 pm 
Beginner
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.