Open
Conversation
DarkoKukovec
commented
May 12, 2022
| const existingModel = this.findOne(modelType, modelId); | ||
| if (existingModel) { | ||
| updateModel(existingModel, model); | ||
| if (!insertOnly) { |
| if (model instanceof Array) { | ||
| model.forEach((item) => { | ||
| this.__insertModel(item, type, id); | ||
| this.__insertModel(item, type, id, insertOnly); |
| const type = getModelType(model as IType | typeof PureModel); | ||
| const modelInstance = upsertModel(data, type, this); | ||
| this.__insertModel(modelInstance, type); | ||
| this.__insertModel(modelInstance, type, undefined, true); |
916a435 to
88c96a4
Compare
da3c137 to
de01aa4
Compare
8fb747e to
de01aa4
Compare
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.
Please select all that apply:
Please describe the differences between the current and new behavior