-->
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: Inheritance "Table per subclasses" and java polymorphism
PostPosted: Wed Sep 23, 2009 4:17 am 
Newbie

Joined: Wed Sep 23, 2009 3:31 am
Posts: 1
Using Hibernate 3, i tried to use inheritance "Table per subclasses" with discriminant as documentation show.
This done, i never get correct polymorphism using many-to-one relation or load method based on mother class ! returned instances was only mother class instances !!

May be i was wrong, but i can't see the usefullness of inheritance if it's not polymorphic at object level.

I change to "Table per subclass" but, without discriminant (first setup) and polymorphism has immediately worked like a charm ( instanceof is now working, ouf ! )

but i'm curious, did i forget something ?


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.