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

Proxy-Client: Incorrect creation of media entities

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • (Java) V4 4.1.0
    • None
    • odata4-ext
    • None

    Description

      Creating a media entity must be a POST with the media entity stream as the content. Setting properties of a media entity is then done by a PATCH. Thats's at least what I undestand.
      The proxy-client does a POST with the entity properties, then a PATCH with the entity properties and then a PUT with the media entity stream.

      The proxy-client doesn't distinguish between entity and media entity creation. In AbstractPersistenceManager there is only a queueCreate and not a create for media entities with service.getClient().getCUDRequestFactory().getMediaEntityCreateRequest. After creating the media entity like a normal entity the processEntityContext method detects that it is a media entity and it has changed (although it was just created) and issues a queueUpdate and then a queueUpdateMediaEntity to update the stream.

      Create the media entity with service.getClient().getCUDRequestFactory().getMediaEntityCreateRequest and if the media entity has properties then update the media entity with service.getClient().getCUDRequestFactory().getEntityUpdateRequest.

      Attachments

        Activity

          People

            Unassigned Unassigned
            frederik.zimmer Frederik Zimmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: