Skip to content
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

Gh 10423 adds a transform option to lean queries #11814

Merged
merged 46 commits into from
Jun 3, 2022
Merged

Gh 10423 adds a transform option to lean queries #11814

merged 46 commits into from
Jun 3, 2022

Conversation

IslandRhythms
Copy link
Collaborator

No description provided.

Uzlopak and others added 20 commits May 18, 2022 15:51
> Dependency Review GitHub Action in your repository to enforce dependency
> reviews on your pull requests.
> The action scans for vulnerable versions of dependencies introduced by package version
> changes in pull requests,
> and warns you about the associated security vulnerabilities.
> This gives you better visibility of what's changing in a pull request,
> and helps prevent vulnerabilities being added to your repository.

https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
When dealing with external schemas, i.e. a mongoose schema created inside another module, instanceOf may not work.

This results in the value of ObjectIds in the schema being converted to strings when saving to the database.
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job getting this working. I'm a little bummed that Mongoose doesn't handle calling completeOneLean() recursively already. But given that we need to do that, you should iterate through the schema's childSchemas to get subdocuments, rather than iterating through the entire object and assuming that any sub-objects you find are subdocuments.

lib/query.js Outdated Show resolved Hide resolved
lib/query.js Outdated Show resolved Hide resolved
lib/query.js Outdated Show resolved Hide resolved
lib/query.js Outdated Show resolved Hide resolved
@IslandRhythms IslandRhythms self-assigned this Jun 2, 2022
Copy link
Collaborator

@vkarpov15 vkarpov15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work 👍

@vkarpov15 vkarpov15 changed the base branch from master to 6.4 June 3, 2022 20:19
@vkarpov15 vkarpov15 merged commit f5dc4f8 into 6.4 Jun 3, 2022
@hasezoey hasezoey deleted the gh-10423 branch May 19, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants