-->
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: filtering collection based on subclass...
PostPosted: Tue Jul 13, 2004 7:42 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 3:22 pm
Posts: 26
helllo,

i have a collection of objetcs of some common type,
and i wonder if is possible to use the Session.createFilter method
to well, filter, the collection based on the subclass

or is it possible to do it other way without having to fetch all the objetcs first??

for instance, say i have a user with a collection of books, and those books are of different kind, is it possible to say something like:

Code:
session.createFilter(user.getBooks(), "where book.class instanceof Thesis") ;


thanks in advance for any help


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.