Any ideas, contributions, improvements for MONGOOSE-LEAN-EXTENSION plugin #15460
SsekandiRaymond
started this conversation in
Show and tell
Replies: 2 comments
-
Cool, thanks for writing this plugin 👍 For |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks, let me update that
…On Wed, Jun 4, 2025 at 7:29 PM Valeri Karpov ***@***.***> wrote:
Cool, thanks for writing this plugin 👍
For record._id = record?._id?.toString();, I'd advise against doing that
because _id can be any type. You should check whether _id is an ObjectId
in the schema, otherwise you might end up converting numbers to strings.
—
Reply to this email directly, view it on GitHub
<#15460 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BJDTIAWTEM32YDFR3HYQHMT3B4NGHAVCNFSM6AAAAAB6P4UJW6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGMZXGAYDSNQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
MONGOOSE-LEAN-EXTENSION plugin
Why is this mongoose plugin written??
Your mongoose query has .lean() but;
Why should you use it?
The plugins extends the .lean() functionality to;
mongoose.plugin(require("mongoose-lean-extension"))
, even populate results will include stringified_id
Beta Was this translation helpful? Give feedback.
All reactions