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

Unable to apply filter on a Collection EdmPrimitiveTypeKind.Guid property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.4.0
    • None
    • odata4-server
    • None

    Description

      I have an Entity with a CsdlProperty of type EdmPrimitiveTypeKind.Guid and collection true.

      When I try to apply a system filter on the entity for that property, for example:

      Name of the entity: Email

      Property which is a collection and has a list of Guid's: Recipient

      Odata rest call:

      https://sampleodataservice/email?$filter=recipient eq 645bc5dd-b83f-41e1-af0b-a0ae56ef667d

      I am seeing the below response:

       A collection expression is not allowed.

      The above call used to work with the Apache Olingo 4.3.0 but it is failing with the new Apache Olingo 4.4.0. I see that the changes in Expression Parser class to check the collection element is creating this exception.

      References:

      https://issues.apache.org/jira/browse/OLINGO-1028

      https://github.com/apache/olingo-odata4/commit/72fcaa1a54a3607ee2b94f66414677ab6f9c8e92#diff-79996ba89231b208eb1639059dc31a7d

      https://git-wip-us.apache.org/repos/asf?p=olingo-odata4.git;a=blobdiff;f=lib/server-core/src/main/java/org/apache/olingo/server/core/uri/parser/ExpressionParser.java;h=7a34095966097f1578b745e1da306dd9a7b94ad7;hp=23fd8a40428ead9c357e779b83d838b299ed0b11;hb=72fcaa1a54a3607ee2b94f66414677ab6f9c8e92;hpb=b9a71ff88a8f304d4bb2b382b6ffb46e5cc8cb1

       

      Could you please provide some information on how to add a filter on a collection property which has elements of type Edm.Guid.

       

      Thanks and Regards,

      Abhilash

       

       

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            apatlolla1024 Abhilash Patlolla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: