-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[⏳] Enhanced auto typed schema. #12122
[⏳] Enhanced auto typed schema. #12122
Conversation
c1155d8
to
20a9073
Compare
b728108
to
b5fccf6
Compare
@@ -599,20 +600,6 @@ function gh11997() { | |||
userSchema.index({ name: 1 }, { weights: { name: 1 } }); | |||
} | |||
|
|||
function gh12003() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is incorrect, Auto typed schema will not work if typeKey has been changed in this way, because it will be "type" and will not reflect the correct type of the actual value.
@Uzlopak @vkarpov15 do you have any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can support this approach to supply schema options with auto typed schema.
It will work just if the end user use "const" assertion and not use predefined type, then the type will reflect the actual value.
b5fccf6
to
d487695
Compare
… timestamps: true but parent schema does not Fix Automattic#12119
…ticgh-12119 fix(timestamps): set timestamps on child schema when child schema has timestamps: true but parent schema does not
style: change jsdoc headers to have a consistent empty jsdoc line after
style(buffer): change ".split" to "utils.each" for defining methods
docs(fix): fix the link to next page in schema types page
per discussion here: Automattic@f5ee642#commitcomment-79569628
Fix Populating Maps example
Update populate.md
Update compatibility.md
…ing performance degradation Re: Automattic#10349
Fix typo `emaill` to `email`
…this, ...>` causes perf issues Re: Automattic#10349
70c6dc5
to
2aa4a62
Compare
Bumps [eslint](https://github.com/eslint/eslint) from 8.19.0 to 8.21.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](eslint/eslint@v8.19.0...v8.21.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
chore(tidelift-alignment): run only in main repository, not in forks
… with a bidirectional reference Fix Automattic#12136 Re: 11911
…ticgh-12143 fix(model+query): handle populate with lean transform that deletes `_id`
docs(compatibility): change to use a table
2aa4a62
to
1397189
Compare
611e66e
to
120665e
Compare
Author: Mohammad Ahmad <kurtular.vadisi@gmail.com>
Author: Mohammad Ahmad <kurtular.vadisi@gmail.com>
Author: Mohammad Ahmad <kurtular.vadisi@gmail.com>
Author: Mohammad Ahmad <kurtular.vadisi@gmail.com>
Author: Mohammad Ahmad <kurtular.vadisi@gmail.com>
Author: Mohammad Ahmad <kurtular.vadisi@gmail.com>
120665e
to
937a491
Compare
@mohammad0-0ahmad is this PR still planned on being updated? because it looks rather stale to me - if this should not get a update within ~30 days, i would close it as "stale" |
Hello @hasezoey ! Sorry for being inactive for a while. Best regards everyone :) |
We're going to close this PR for now. We implemented part of this PR in #12731, but ran into some issues like #12871. Given those issues, we want to sort out getting this working for just |
@vkarpov15 Was there any progress made on #11787? Or any relevant findings? I tried tackling this about 6 months ago but didn't have any luck, would like to give it another shot |
Enhance the auto typed schema by covering the effects related to the schema options value.
Issues to be covered or enhance the already solved ones:
__v
pathid
virtual path_id
field is specified in the schema definition, the type of_id
field cannot be correctly inferred in the HydratedDocument, perhaps due to incorrect implemention ofRequire_id
#12070$push
is incorrect. #12126