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
|