[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-298) allow joins in filters

Shawn Clowater (JIRA) noreply at atlassian.com
Mon Jan 8 15:35:44 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-298?page=comments#action_25759 ] 

Shawn Clowater commented on HHH-298:
------------------------------------

Is it possible to get this reopened?  I have an actual business case other than performance where I would find this VERY worthwhile.

Complete details for this can be found at:
http://forum.hibernate.org/viewtopic.php?t=968935&highlight=

However, the short version is this.

We apply a number of filters dynamically at the entity level.  One or more of those filters depend on need to join to a child table which we are accomplishing right now with a subselect.

However, when we started this we realized that additional filter conditions needed to be aware of the filter with the subselect so what we ended up with was different filters that have multiple permutations.

We're getting to a point now where we're adding more and more filters in the upcoming months that handling all of these permutations will quickly become too unmanageable.  In fact, we're already to that point.  If we could tack on a join condition this would greatly simplify our filters and much rejoicing would occur.

The initial reason for close was 'no time', however, that was a year ago.

> allow joins in filters
> ----------------------
>
>          Key: HHH-298
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-298
>      Project: Hibernate3
>         Type: Improvement

>   Components: core
>     Reporter: Steve Ebersole
>     Assignee: Steve Ebersole

>
>
> For the sake of performance with complex filters, it'd be nice to allow users to specify joins fragments to be added to the filter tags.  Somthing like:
> <filter name="myFilter">
>     <filter-join table="MyPermissionTable">
>         <condition>
>             {this}.id =
>             {MyPermissionTable}.object_id
>         </condition>
>     </filter-join>
>     <![CDATA[
>         {MyPermissionTable}.user_id =
>         :userId 
>             AND 
>         {MyPermissionTable}.perm_flg <
>         :userPermLevel
>     ]]>
> </filter>

-- 
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