0 Replies Latest reply on Nov 14, 2005 9:29 AM by James Depoorter

    filters in hibernate for (not) getting suspend/cancel and ot

    James Depoorter Novice

      Hibernate 3 has the notion of filters, that you can switch on (or off), so basic queries are "enhanced". Instead of repeatedly changing all the queries to support e.g. the notion of "suspend", you could easily define a filter that does the job for you, so that all subsequent hibernate queries within that session will use the filter.
      - "normal" users will only get the non-suspended processes/task instances (this could be the default filter).
      - task instances could be filtered by actor (so a basic query is sufficient)
      - administrative tools could get all task instances by clearing the filters or specify others.

      I know DBA's could hate this, because the preparation of the query is not static anymore.

      see http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#objectstate-filters

      Thoughts and comments? Shoot!!