-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
refactor: only merge simple objects in ORMUtils.mergeDeep
#7774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: only merge simple objects in ORMUtils.mergeDeep
#7774
Conversation
d7e0dca to
2d959d0
Compare
|
@imnotjames what is the plan with this PR? When do you think it'll be ready for review? |
Tests to confirm this doesn't break behaviors for mongo & other locations I've been focused on some other areas of the codebase instead. |
|
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
|
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
…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
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