-->
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: MySQL Fulltext Search over an Inheritance hierarchy
PostPosted: Wed Jan 24, 2007 6:35 pm 
Newbie

Joined: Wed Jan 24, 2007 6:17 pm
Posts: 3
Hi,
I'm running hibernate 3.2 and mysql 5.0.26. I'd like to leverage mysql's fulltext search features. I'd like to map a object hierarchy of around 20 classes with a maximum depth of 4. Currently I have one table for the hierarchy which is fine, as the classes do not have that many different properties, but I could also change that if it helps for the problem.
What I want to do now, is to do a fulltext search over all objects in the hierarchy and return an array with all the found objects in it. I do not know how I can get the objects of different type out of the database with one query. For the time being I used native SQL queries for a particular class and specified the class with addEntity(), but this doesn't work if I want to preserve the type of the objects I get out of the database. If I specify the highest class of the hierarchy, I only get the attributes of that class.

Is there any way of realizing this with a single query or do I have to query for every single type and put the array together afterwards?

Help is very much appreciated.

hans peter


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.