[PR #111] [CLOSED] Prevent importUniqueObjects from creating duplicates #460

Closed
opened 2025-12-29 18:27:08 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/JohnEstropia/CoreStore/pull/111
Author: @andriichernenko
Created: 10/12/2016
Status: Closed

Base: swift3_developHead: duplicate-import-fix


📝 Commits (1)

  • 4c3bec2 fix duplication when using importUniqueObjects with non-unique import sources

📊 Changes

2 files changed (+72 additions, -7 deletions)

View changed files

📝 CoreStoreTests/ImportTests.swift (+59 -0)
📝 Sources/Importing/BaseDataTransaction+Importing.swift (+13 -7)

📄 Description

Unfortunately, pull request #109 introduced a bug into importUniqueObjects method: when sourceArray contains import sources with same IDs, multiple objects will be created (from the last of the input sources).

The purpose of this pull request is to fix this bug. Let me know if I need to create an issue for the bug before this pull request can be merged.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/JohnEstropia/CoreStore/pull/111 **Author:** [@andriichernenko](https://github.com/andriichernenko) **Created:** 10/12/2016 **Status:** ❌ Closed **Base:** `swift3_develop` ← **Head:** `duplicate-import-fix` --- ### 📝 Commits (1) - [`4c3bec2`](https://github.com/JohnEstropia/CoreStore/commit/4c3bec287c0789407522ef9417fbdf6be260f2e9) fix duplication when using importUniqueObjects with non-unique import sources ### 📊 Changes **2 files changed** (+72 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `CoreStoreTests/ImportTests.swift` (+59 -0) 📝 `Sources/Importing/BaseDataTransaction+Importing.swift` (+13 -7) </details> ### 📄 Description Unfortunately, pull request #109 introduced a bug into `importUniqueObjects` method: when `sourceArray` contains import sources with same IDs, multiple objects will be created (from the last of the input sources). The purpose of this pull request is to fix this bug. Let me know if I need to create an issue for the bug before this pull request can be merged. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 18:27:08 +01:00
adam closed this issue 2025-12-29 18:27:08 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore-JohnEstropia#460