From 2231e063caaa4179d963967feca374d20c473dc8 Mon Sep 17 00:00:00 2001 From: ds-lcapellino Date: Mon, 8 Jul 2024 12:42:49 +0200 Subject: [PATCH] Revert "bug: 1082 use saveAndFlush() to fix duplicate key errors" This reverts commit 6920aeda2d155b58feda52941ab2d6f9080739ed. --- .../asbuilt/repository/AssetAsBuiltRepositoryImpl.java | 2 +- .../asplanned/repository/AssetAsPlannedRepositoryImpl.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java index 3e8b26f02c..195a248774 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asbuilt/repository/AssetAsBuiltRepositoryImpl.java @@ -92,7 +92,7 @@ public List getAssets() { @Override public AssetBase save(AssetBase asset) { - return jpaAssetAsBuiltRepository.saveAndFlush(AssetAsBuiltEntity.from(asset)).toDomain(); + return jpaAssetAsBuiltRepository.save(AssetAsBuiltEntity.from(asset)).toDomain(); } @Override diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java index bdbafa25f0..a6d16091b7 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/assets/infrastructure/asplanned/repository/AssetAsPlannedRepositoryImpl.java @@ -101,7 +101,7 @@ public List getAssets() { @Override public AssetBase save(AssetBase asset) { - return AssetAsPlannedEntity.toDomain(jpaAssetAsPlannedRepository.saveAndFlush(AssetAsPlannedEntity.from(asset))); + return AssetAsPlannedEntity.toDomain(jpaAssetAsPlannedRepository.save(AssetAsPlannedEntity.from(asset))); } @Override