Reputation: 289
is there a way to filter any gorm query like the Hibernate Filter Plugin (http://grails.org/plugin/hibernate-filter) does but on an easier way without a plugin?
What I need: On every query concerning a concrete model, gorm should check an enabled-attribute. If it's fales gorm should not return it.
Thank you for you help.
Upvotes: 3
Views: 1138
Reputation: 5540
You can bypass gorm DSL and use hibernate annotation.
Declare your class with annotation as explained here
and than add all Hibernate Filters Annotation you want as explained here
Upvotes: 2