-->
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: Heterogeneous Behaviour when it shouldn't ?!?
PostPosted: Fri Jul 14, 2006 7:18 pm 
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.1.3.

Hi everybody.

I've been using Hibernate from a couple of years already and i'm facing some problem hard to figure.

I have a class called User.

I fetch user using getSession().get(myClazz, id);

The results differ from time to time regarding the use of CGLIB.

For Instance:

Sometimes user gets loaded and the instance is User and sometimes user gets loaded and the instance is User$$EnhancedByCGLIB$$

My Question is:

Isn't this behaviour homogenious ?!?!?

I load an User instance and there is a mehod in my app that uses reflection to invoke all its "get"... methods. It happens that it tries to invoke automatically getCallback from CGlib and i don't want it to happen cos' i'm getting an IllegalArgumentException....
Actually, i didn't want this main node (usr) to get proxied by CGlib but only its properties and collections (as it always does, but somethimes the node comes proxied)

I could evict this class from being proxied by many means (ex final) but i'd have to it to every class...

PS: org.hibernate.Hibernate.initialize () DOES NOTHING TO MY OBJECT. Actually i never managed to make it work...

Cheers,

:Luiz>Decaro.


Top
  
 
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.