         let primaryKeyValues = primaryKeyColumns.map {
             persistenceContainer[caseInsensitive: $0]?.databaseValue ?? .null
         }
-        guard primaryKeyValues.contains(where: { !$0.isNull }) else { return nil }
+        if primaryKeyValues.allSatisfy({ $0.isNull }) {
+            return nil
+        }
         
         // Don't update columns not present in columns
         // Don't update columns not present in the persistenceContainer

        let primaryKeyValues = primaryKeyColumns.map {
            persistenceContainer[caseInsensitive: $0]?.databaseValue ?? .null
        }
        guard primaryKeyValues.contains(where: { !$0.isNull }) else { return nil }
        
        let query = ExistsQuery(
            tableName: databaseTableName,

        let primaryKeyValues = primaryKeyColumns.map {
            persistenceContainer[caseInsensitive: $0]?.databaseValue ?? .null
        }
        if primaryKeyValues.allSatisfy({ $0.isNull }) {
            return nil
        }
        
        let query = DeleteQuery(
            tableName: databaseTableName,
