I am currently building a rust app which relyes on mongodb. I am struggeling to create the struct for documents without manuanlly setting them. I need to be able to access the _id. I am currently using the bson::default() however, I am conserned that the Id may be already used within the database. Is this a correct approch or is there a diffrent way to access the _id while letting the mongo driver assign an id.
Thank you for reading.
Skip to main content
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
Conversion from ICollection<Model> to List<Model> fails with Exception for LINQV3 Provider | 1 | 354 | Jul 2024 |
Darshan Hiranandani : Has anyone tried disabling writeConcern acknowledgment to improve performance? What were the results? | 1 | 46 | Sep 2024 |
Performance difference on X86 and ARM when used different versions of MongoDB v5,v7,v8 | 2 | 225 | Nov 2024 |
Migrating to LinqProvider.V3 | 2 | 77 | Oct 2024 |
MongoDB Go Driver 2.0 options.ArrayFilters seems to be gone | 3 | 75 | Jan 23 |