diff --git a/dependency-check-core/src/main/resources/data/dbStatements_h2.properties b/dependency-check-core/src/main/resources/data/dbStatements_h2.properties index aea9f986a..59b4204c5 100644 --- a/dependency-check-core/src/main/resources/data/dbStatements_h2.properties +++ b/dependency-check-core/src/main/resources/data/dbStatements_h2.properties @@ -13,3 +13,4 @@ # limitations under the License. MERGE_PROPERTY=MERGE INTO properties (id, value) KEY(id) VALUES(?, ?) +CLEANUP_ORPHANS=DELETE FROM cpeEntry WHERE id IN (SELECT id FROM cpeEntry LEFT JOIN software ON cpeEntry.id = software.CPEEntryId WHERE software.CPEEntryId IS NULL)