Enable filters by default

Description

The only way to apply a filter within a session currently is doing a getcurrentSession().enableFilter("XYZ filter").

It would be good if we can enable and disable the filter through a configuration prameter.

This would be more useful if we can use the same code and have different configurations.

Activity

Show:

Christian Beikov April 5, 2024 at 9:10 AM

This was fixed via

Marco Janc December 7, 2020 at 11:32 PM
Edited

This would be great since filters can also be used in calculated formula properties but throw illegal syntax expression if the filter is not enabled since no parameter replacement takes place.

For this entity i need to activate this filter by default.

Currently i always add default filters with dummy parameters using my getSession() method.

Annoying that if i really want to use the filter i basically must reset it after i loaded the entities.

Giovanni Lovato September 1, 2016 at 6:51 AM
Edited

This is 7 years old, but I think it would very useful to have some filters enabled by default for all sessions. Say they could be disabled at will, but need not to be explicitly enabled. Something like @FilterDef( name = "foo", autoApply = true ) to have foo applied everywhere, and @Filter( name = "foo", autoApply = true ) to have foo applied by default on that association.

Out of Date

Details

Assignee

Reporter

Priority

Created March 16, 2009 at 11:39 PM
Updated April 5, 2024 at 9:10 AM
Resolved April 5, 2024 at 9:10 AM