Replace CascadeOnDelete eclipse link annotation with CascadeType.REMOVE (#2028)

more standard approach

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2024-11-14 17:06:13 +02:00
committed by GitHub
parent fdd00623b5
commit a2f03b3724
14 changed files with 34 additions and 61 deletions

View File

@@ -365,8 +365,7 @@ class MgmtTargetTypeResourceTest extends AbstractManagementApiIntegrationTest {
@WithUser(principal = TEST_USER, allSpPermissions = true)
@Description("Checks the correct behaviour of /rest/v1/distributionsettypes/{ID} DELETE requests.")
void deletingDsTypeRemovesAssignmentFromTargetType() throws Exception {
String typeName = "TestTypeRemoveDs";
TargetType testType = createTestTargetTypeInDB(typeName, Collections.singletonList(standardDsType));
TargetType testType = createTestTargetTypeInDB("TestTypeRemoveDs", Collections.singletonList(standardDsType));
assertThat(testType.getCompatibleDistributionSetTypes()).hasSize(1);
assertThat(distributionSetTypeManagement.getByKey(standardDsType.getKey())).isNotEmpty();