-->
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: Table per class hierarchy & eager loading
PostPosted: Fri Oct 21, 2005 9:05 pm 
Newbie

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

since the table per subclass strategie was too slow, i switched to
the table-per-class-hierarchy strategie to represent the following
inheritance:

Image

My problem:
i usually don't want to recieve the data from all descriptors.

i'm am using query by criteria (since it makes it so easy to create
dynamic queries).

when i only include restrictions on the image columns, the descriptors
are eager-loaded, however i also recieve all descriptors belonging to the
selected images.

when i include restrictions on the image AND the descriptor columns
the descriptors aren't eager-loaded anymore.

i realized that i can use filters (in the xml mapping files), but i need to
create the queries dynamically (depending on the user input). do i
have to make a filter for every column and dynamically add the filters to
the session?

when i tried this i recieved too many images, since only the descriptors
are filtered by filters. i suddenly had images with no descriptors. these
images should'nt be included in the result list.

what i really need is, to be able to put restrictions on image table as well
as descriptor table columns, and load everything eagerly!!!

how do i do that?? any ideas????
thanks in advance,
cheers, nick


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.