Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
(Java) V4 4.1.0
-
None
-
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.