refactor: only merge simple objects in ORMUtils.mergeDeep#7774
Merged
imnotjames merged 2 commits intotypeorm:masterfrom Jul 5, 2021
Merged
refactor: only merge simple objects in ORMUtils.mergeDeep#7774imnotjames merged 2 commits intotypeorm:masterfrom
ORMUtils.mergeDeep#7774imnotjames merged 2 commits intotypeorm:masterfrom
Conversation
d7e0dca to
2d959d0
Compare
7 tasks
Contributor
|
@imnotjames what is the plan with this PR? When do you think it'll be ready for review? |
Contributor
Author
Tests to confirm this doesn't break behaviors for mongo & other locations I've been focused on some other areas of the codebase instead. |
Contributor
Author
|
so - use cases were the weird mongo edge case & usages of I think all of those are hit now - I replaced the mongo edge case with a more specific |
a6a48f7 to
1d79b15
Compare
Contributor
Author
|
Hmm.. failure looks to be related to this change. Bummer! Gotta figure that out. |
1d79b15 to
eb5a2b3
Compare
ORMUtils.mergeDeep
f32d9e3 to
ec6c614
Compare
The mergeDeep functionality was causing issues where it would try to merge objects that were not safe to merge. to correct this we now only merge plain objects - such as those returned by createValueMap. there were three cases where the mongo driver had a split off code path where it passed in entities, so we've updated to instead update that to createValueMap as well
ec6c614 to
7e36579
Compare
add basic support of array embedded in ColumnMetadata so we can use getEntityValueMap and getEntityValue with mongo
7e36579 to
b9a5071
Compare
MerlinB
pushed a commit
to MerlinB/typeorm
that referenced
this pull request
Jul 20, 2021
…7774) The mergeDeep functionality was causing issues where it would try to merge objects that were not safe to merge. to correct this we now only merge plain objects - such as those returned by createValueMap. there were three cases where the mongo driver had a split off code path where it passed in entities, so we've updated to instead update that to getEntityValueMap as well adds basic support of array embedded in ColumnMetadata so we can use getEntityValueMap with mongo fixes typeorm#5096 fixes typeorm#5762 fixes typeorm#6181 fixes typeorm#5487 fixes typeorm#5321
7 tasks
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 change
based on the work of #5097
fixes #5096
fixes #5762
fixes #6181
fixes #5487
fixes #5321
Pull-Request Checklist
masterbranchnpm run lintpasses with this changenpm run testpasses with this changeFixes #0000