-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
The issue is quite simple: if the below class is added to MongoDb Realm, the Number property doesn't get added to Atlas. The problem is that when changing the object on Atlas with the required properties missing, Realm Sync schema validation fails, resulting in the error "Failed to apply MongoDB change event to sync history; document is missing required field(s)".
Unable to find source-code formatter for language: cs. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
class SomeObj : RealmObject { // Id and Partition properties... public int Number { get; set; } }
Realm schema:
{ "title": "SomeObj", "required": [ "Number" ], "properties": { "Number": { "bsonType": "int" }, "_id": { "bsonType": "string" }, "_partition": { "bsonType": "string" } } }
It's the same problem explained on this thread but on the Swift SDK this was only happening because of an update: .modified parameter: I cannot synchronize data between MongoDB Atlas cluster and client application
Is there any workaround on the .NET SDK besides not setting the values as default?
Version of Realm and Tooling
- Flavor:
- [x] MongoDb Realm
- [ ] Realm Cloud
- [ ] Self-Hosted
- Client SDK Version: 10.0.0-beta3