Repository navigation
Conversation
Contributor
Author
|
@yegor256 take a look please, happy to clarify anything in the change. |
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.
Fbe.delete_onedeleted every fact its id query matched and inserted one rebuilt fact back, so when two facts shared an id, the one that was not given was destroyed along with its properties. #914 gaveFbe.deleteandFbe.overwritea guard against this anddelete_onewas left out.It now counts what
delete!removed and raisesFbe::Errorwith the same message asFbe.deletewhen more than one fact went, and the transaction rolls the deletion back. The extra branch pushed the method over the complexity cops by one, so the check for a missing property was merged into theindexlookup right after it. The behavior is the same: nothing happens when the property or the value is absent.The tests cover two facts sharing
_idand a random number of facts sharing a customid:property. My #842 touches the samedelete!line, so whichever of the two lands second will need a small rebase.Closes #1175