-->
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.  [ 2 posts ] 
Author Message
 Post subject: Implicit Polymorphism Issues
PostPosted: Mon Jan 09, 2006 2:49 pm 
Newbie

Joined: Wed Jan 04, 2006 12:39 pm
Posts: 9
I have an object that I've loaded, and one of its properties is an OrgUnit. OrgUnit is a parent class to Organization. This particular object is an Organization, or it least it seems to be in the database. I've even run the query and checked the results, and the subclass properties are all loaded correctly. Yet, for some reason, if I try to cast the OrgUnit to an Organization I get a ClassCastException.

So what I'm wondering is this: is implicit polymorphism utilized if the polymorphic object is lazily loaded?

Hibernate version:
3.1


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 15, 2006 9:52 am 
Beginner
Beginner

Joined: Sat Dec 17, 2005 1:24 pm
Posts: 42
Location: Berlin, Germany
Hi!

I cannot exactly help you, but I had a similar issue with lazy initialization of polymorphic classes. I could not defer the type of lazy-loaded objects within a collection. I did some experiments but could not come up with a solutions and eventually disabled lazy loading for this instance.

All the best,

René


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

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.