-->
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.  [ 3 posts ] 
Author Message
 Post subject: Table-Per-Subclass Query Problem
PostPosted: Tue Oct 18, 2005 2:22 pm 
Newbie

Joined: Tue Oct 11, 2005 5:55 am
Posts: 8
hi everybody,

I've spend so much time now trying to figure this out, but i simply don't
seem to get it right.

my database as well as my model look like this:
I used the table-per-subclass strategie to represent the inheritance.


Image


My problem:
i usually don't want to recieve the data from all descriptors. but when i make
a query, i unfortunately always get all the descriptors belonging to my image.

how can i say that i only want "Images that have a DESCRIPTOR_1" and
only get the image data and the DESCRIPTOR_1 data, but not the data
from all the other descriptor subclasses.

can anybody help me?
some kind of Criteria example would be really great!!

thanks a lot,
cheers nick


Top
 Profile  
 
 Post subject: Re: Table-Per-Subclass Query Problem
PostPosted: Tue Oct 18, 2005 2:30 pm 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
If you're using Hibernate 3.x, you should look at Filters.

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject: Re: Table-Per-Subclass Query Problem
PostPosted: Tue Oct 18, 2005 6:03 pm 
Newbie

Joined: Tue Oct 11, 2005 5:55 am
Posts: 8
thanks a lot, exactly what i was looking for!!!


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