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
Make UUID a formal Schema.Type #3208
Comments
As far as I know, the mongoose 'buffer' type is what you want for storing the BinData BSON type. http://mongoosejs.com/docs/schematypes.html |
Created a PR #3242 |
should not be closed |
@vkarpov15 Any comment as to why the PR with a fix was closed? I would love to se this feature released soon! |
@L14MJ4M3S0N I'm not sure why the PR was closed, the PR author closed it without any feedback. |
+1 |
For those that are looking for a workaround and do not want to use published NPM packages, here is what I have been using. Interface
Schema:
FindOne Example
Returning a uuid as a string
|
Now that #12268 is merged and released, this issue can be closed. |
i kinda expected this to auto-close because of the keyword in #12268, but it didnt |
Hi,
I was wondering.. why is UUID not supported as a formal Schema Type? Mongo has support for storing it as BinData(), which seems to require about 50% of the space as compared to storing them as Strings.
The mongo shell has a built in function UUID() for the conversion... It seems like this would be a nice addition to mongoose.
The text was updated successfully, but these errors were encountered: