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

Invalid behavior of toupper function

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • V2 2.0.11
    • None
    • odata2-core
    • None

    Description

      Entity LearningJournals has field IndividualProgramReason (enum type)

      URL Request:

      Unsuccessful:

      /LearningJournals?$top=5&$filter=toupper(IndividualProgramReason) eq 'EDUCATION'

      doesn't work 

      "OData - JPA Runtime: JPA query syntax is not correct"

       

      Successful:

      /LearningJournals?$top=5&$filter=startswith(toupper(IndividualProgramReason),'EDUCATION')
      
      /LearningJournals?$top=5&$filter=startswith(IndividualProgramReason, 'ED')
      

      After research of problem I found:

      ?$filter=toupper(IndividualProgramReason) eq 'EDUCATION'
      

      parameter EDUCATION has type String. It is conflict of type of field (enun type) and parameter (string)

       

      ?$filter=IndividualProgramReason eq 'EDUCATION'
      

      parameter EDUCATION has type Enum. No conflict.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            mgr Grigorii Mirsaitov

            Dates

              Created:
              Updated:

              Slack

                Issue deployment