-
Notifications
You must be signed in to change notification settings - Fork 63
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
How to use UUID as _id #374
Comments
If you want your UUID to be as _id, you need :
Then this field value will be stored as _id of your object |
Thanks for the assistance. I've now worked out the problem - when I use inheritance umongo/Mongo ignores my attribute:
If SeriesModel inherits directly from Document then the result is as I originally desired - an UUID value for the _id :
Is this the correct behaviour for inheritance, or is there another parameter I need to set in order to use inheritance? Cheers |
I want to use UUID for the _id value, but I can't get Mongo to recognise the value.
I start by setting
uuidRepresentation='standard'
parameter when initiating the MongoClient connection.In my schema I declare a UUID attribute; this seemed to have no effect:
Declaring the attribute as a string, the result is the same:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: