Skip to content

Commit da2a758

Browse files
authored
Adds Transactional to delete SME (#720)
1 parent 72e5efd commit da2a758

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • basyx.submodelservice/basyx.submodelservice-backend-mongodb/src/main/java/org/eclipse/digitaltwin/basyx/submodelservice/backend

basyx.submodelservice/basyx.submodelservice-backend-mongodb/src/main/java/org/eclipse/digitaltwin/basyx/submodelservice/backend/MongoDbSubmodelOperations.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import org.springframework.data.mongodb.core.query.Update;
5656

5757
import com.mongodb.client.result.UpdateResult;
58+
import org.springframework.transaction.annotation.Transactional;
5859

5960
/**
6061
* MongoDb implementation of the {@link SubmodelOperations}
@@ -180,6 +181,7 @@ public void updateSubmodelElement(String submodelId, String idShortPath, Submode
180181
}
181182

182183
@Override
184+
@Transactional
183185
public synchronized void deleteSubmodelElement(String submodelId, String idShortPath) throws ElementDoesNotExistException {
184186

185187
Submodel submodel = getSubmodel(submodelId);

0 commit comments

Comments
 (0)