From eec478b4c72b8ca035e12229d93fc4af40254463 Mon Sep 17 00:00:00 2001 From: NielsCW <99152561+NielsCW@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:47:44 +0200 Subject: [PATCH] Update spring-content-rest/src/main/java/org/springframework/data/rest/extensions/entitycontent/RepositoryEntityMultipartController.java Co-authored-by: Lars Vierbergen --- .../entitycontent/RepositoryEntityMultipartController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-content-rest/src/main/java/org/springframework/data/rest/extensions/entitycontent/RepositoryEntityMultipartController.java b/spring-content-rest/src/main/java/org/springframework/data/rest/extensions/entitycontent/RepositoryEntityMultipartController.java index 42dec65ea..2ed0fb340 100644 --- a/spring-content-rest/src/main/java/org/springframework/data/rest/extensions/entitycontent/RepositoryEntityMultipartController.java +++ b/spring-content-rest/src/main/java/org/springframework/data/rest/extensions/entitycontent/RepositoryEntityMultipartController.java @@ -97,7 +97,7 @@ public ResponseEntity> createEntityAndContent(RootResourc String store = pathSegments[1]; - // Save the entity and re-assign the result to savedEntity, so that its @Id property exists + // Save the entity and re-assign the result to savedEntity, so that it exists in the repository before content is added to it. savedEntity = repoInvokerFactory.getInvokerFor(domainType).invokeSave(savedEntity); StoreInfo info = this.stores.getStore(Store.class, StoreUtils.withStorePath(store));