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

Olingo2 throw an exception when a key is null on a POST operation (which will be autogenerated)

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

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • odata2-core
    • None

    Description

      There are some cases, where a field is marked as non-nullable in the EDM (Nullable=false), just because it won't be null on GET or PATCH operations. But in POST operation, that field is automatically generated with the target system, like a sequential key (it's happened in a lot of cases on SAP S4Hana system). 

      With those cases, Olingo2-core is throwing an exception in the following line: https://gitbox.apache.org/repos/asf?p=olingo-odata2.git;a=blob;f=odata2-lib/odata-core/src/main/java/org/apache/olingo/odata2/core/edm/AbstractSimpleType.java;h=e78e8b653cc3d76245883f0487dedb58ca54cd0b;hb=refs/heads/master#l104 

       

      Is it possible to remove that validation?

       

      Thanks in advance, regards

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            britogaston Gastón Brito

            Dates

              Created:
              Updated:

              Slack

                Issue deployment