Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-655

Class level query filter

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • query
    • None

    Description

      A class-level query filter that applies to all queries implicitly is a useful functionality and available in similar software product [1].

      The base functionality is:
      a) A class can be annotated with a query

      @Entity
      @Filter(query="SELECT x FROM PObject x WHERE x.field = f1 AND x.status =! DONE")
      public class PObject

      {...}

      b) Any query on class PObject will augment the class-level filter predicates.

      c) @Filter query can be parametrized. The parameters can be set on current FetchPlan.

      Will attach a draft/prototype for such functionality. Please take a look and let me know your valued comments.

      [1] http://www.hibernate.org/hib_docs/reference/en/html/filters.html

      Attachments

        1. class-filter.patch.txt
          31 kB
          Pinaki Poddar

        Activity

          People

            ppoddar@apache.org Pinaki Poddar
            ppoddar@apache.org Pinaki Poddar
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: