[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-160) Truly polymorphic queries

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Nov 17 10:33:15 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31731#action_31731 ] 

Hardy Ferentschik commented on HSEARCH-160:
-------------------------------------------

The idea for solving this issue is:

* build some kind of "superclass" tree at init time - Map<Class<?>, List<Class<?>>
* at query time compared the targeted classes to this tree/list, eg if targeted class is Object all indexed entities are targeted since Object is a superclass of all entities. If for example the targeted class is Serializable only the ndexed entities which implement Serializable are returned

Caveat:
Do not add subclasses in result list if eg the targeted class is Serializable and Person is for example superclass of Customer.
Or think about the case one class implements Serializable and the other Auditable and the query includes both interfaces.
 
Check MultiQueryLoader. It contains similar code.

> Truly polymorphic queries
> -------------------------
>
>                 Key: HSEARCH-160
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-160
>             Project: Hibernate Search
>          Issue Type: New Feature
>          Components: engine
>            Reporter: Emmanuel Bernard
>            Assignee: Hardy Ferentschik
>             Fix For: 3.1.0
>
>
> Support something like
> ftsession.createFullTextQuery(luceneQuery, java.io.Serializable.class);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list