Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-1048

Exception Handling in Class ODataJPAQueryExtensionEntityListener

    XMLWordPrintableJSON

Details

    Description

      Hi all,
      I'm extending class ODataJPAQueryExtensionEntityListener in order to modify the sql query to our needs in getQuery methods. In some cases I like to return no entry / query (e.g. the user has not the sufficient role) which is not possible currently as the default query will be build in case one returns null see

      https://github.com/apache/olingo-odata2/blob/master/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAQueryBuilder.java#L74

      on the other hand there are cases in which I like to throw and error message of type ODataException in method getQuery to propagate this information to the consumer instead of returning an empty list.

      Best
      Alex

      Attachments

        Activity

          People

            mirbo mibo
            aparr Alexander Parr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: