Moved Remove operation to start of Table.Apply#2967
Merged
Conversation
jdetter
approved these changes
Jul 23, 2025
Contributor
jdetter
left a comment
There was a problem hiding this comment.
I gave this a try using my fruit merge 3D example and it works now, thanks Ryan! 👍
Shubham8287
pushed a commit
that referenced
this pull request
Jul 28, 2025
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
bfops
pushed a commit
that referenced
this pull request
Aug 7, 2025
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
mamcx
pushed a commit
that referenced
this pull request
Aug 26, 2025
Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Intends to resolve issue 343 of the C# SDK.
In issue 343, the example project uses fails due the
PlayerFruitStatetable being defined with anIdentityvalue is marked asuniquerather thanprimary_keyas is typically the case. Without defining aprimary key, data from all rows is used as the primary key.In the sample project, when the
PlayerFruitStatetable was being updated, theIdentityvalue would stay the same, and the other values would change. This should still be a supported operation, and would look like a removal of the Identity row with the old value and an addition of the Identity row with the new value, rather than a single update operation.Note: If the
Identitywas marked asprimary_key, this would be an update operation, because only theIdentityvalue would be used for the key, rather than all rows.Because of the existing order of operations in a
Table.cs'sApplymethod, the new row being added to thePlayerFruitStatetable prior to the old row being removed. Due to theIdentityvalue having theuniqueconstraint, this caused the initial add to throw an error during the add operation.This change simply moves the Remove operation before Add, which is best-practice for these types of operations.
API and ABI breaking changes
Not API breaking.
Expected complexity level and risk
1
Testing