-->
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.  [ 4 posts ] 
Author Message
 Post subject: Polymorphism question
PostPosted: Fri Sep 12, 2003 8:15 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 7:53 am
Posts: 27
Hi,

suppose I have two classes, where one of them is a joined-subclass of the other. Is there any decent way to get only members of the superclass, but none of the subclass type with one query? (I've tried to play with polymorphism=explicit, but seems it doesn't help on this, queries retreiving the superclass type still return subclasses as well).

tia,
dyn

_________________
.Digital.Yearning.for.Networked.Assassination.and.Xenocide


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2003 10:52 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
where alias.class = ClassName


I _think_!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2003 11:08 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 7:53 am
Posts: 27
Works.. cool!

Thanks :)

_________________
.Digital.Yearning.for.Networked.Assassination.and.Xenocide


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 12, 2003 11:12 am 
Beginner
Beginner

Joined: Wed Aug 27, 2003 7:53 am
Posts: 27
" Likewise, the special property class accesses the discriminator value of an instance in the case of polymorphic persistence. A Java class name embedded in the where clause will be translated to its discriminator value.

from eg.Cat cat where cat.class = eg.DomesticCat"

oh well.. it's in the docs too. Might would be worth linking that to the part where polymorphism is getting described..

dyn

_________________
.Digital.Yearning.for.Networked.Assassination.and.Xenocide


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.