Skip to content

Letting RavenDB assign GUID's ends up with an empty string as the Id saved in the document #209

@klaassens

Description

@klaassens

We want to store documents and let RavenDB assign Guid identifiers to the documents. From the documentation:

Then, you have to provide the string.Empty as the value of the Id property.

By setting Id = "" we end up with a document with @id as the generated UUID but Id in the document itself is assigned to "", for example:

 {
            "Id": "",
            "title": "iPhone Y",
            "manufacturer": "Apple",
            "@metadata": {
                "@collection": "Products",
                "Raven-Python-Type": "__main__.Product",
                "@change-vector": "C:1027705-63CKfhE1G02uaoUbVT6Hxg, B:1019472-D+grPhn0LEWxgkzi2Eq3pA, A:1024197-z513QARBcU+VJM+Oc0Jrdw",
                "@flags": "FromReplication",
                "@id": "44e0d566-e783-4eae-b72c-fd4bc6da0035",
                "@last-modified": "2024-02-29T14:23:28.9212273Z",
            }

Relates to this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions