BHoM / BHoM/Mongo_Toolkit

Upsert updates wrong objects in the collection

Open
#172 3 comments 0 reactions 2 assignees Assigned to @alelom View on GitHub
type:bug
Dominant language
C#
Stars
2
Forks
4
PR merge metrics
No merged PRs in 30d

Description

#### Description:

Using Mongo_Adapter in upsert mode `(PushType.UpdateOrCreateOnly`) yields seriously wrong results: due to the fact that the pushed objects are matched by `__Tag__` instead of `BHoM_Guid`, any sort of wonderful updates happens - see the test files.

#### Test files:
On [SharePoint](https://burohappold.sharepoint.com/sites/BHoM/02_Current/Forms/AllItems.aspx?RootFolder=%2Fsites%2FBHoM%2F02%5FCurrent%2F12%5FScripts%2F01%5FIssue%2FBHoM%2FMongo%5FToolkit%2F%23172%2DUpsertBug&FolderCTID=0x0120008122C8891F89054B8ACED0196C70DFC4).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.