Skip to content

Conversation

@poissoncorp
Copy link
Contributor

https://issues.hibernatingrhinos.com/issue/RDBC-812/Dont-send-Id-property-to-the-server
#209

Breaking Change:

  • Id property won't be stored at the server any more

Implications:

  • Document id is still available as a value of the Id property, but the value is set after serialization
  • Documents loaded as dict objects won't contain the Id key (still available via session.advanced.get_metadata_for(...)["@id"] or session.advanced.get_document_id())
  • Custom from_json methods that have been setting the Id property should skip that step, as the Id property will be set to a valid value after the serialization

@poissoncorp
Copy link
Contributor Author

The latest commit ensures that dict entities that was stored before, and then loaded using valid object_type e.g. Company will be having Id property filled with proper value

@poissoncorp poissoncorp requested a review from ml054 March 5, 2024 11:48
@poissoncorp poissoncorp merged commit a2f85f2 into ravendb:v5.2 Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants