realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.72k stars 564 forks source link

diffing update should be default #2448

Open kneth opened 5 years ago

kneth commented 5 years ago

Currently the default behaviour of Realm.create() is to create new objects (updateMode defaults to 'never'). The suggestion is to change it to 'modified'.

The code change is in https://github.com/realm/realm-js/blob/master/src/js_realm.hpp#L970 (false -> true). But maybe some tests will fail due to this.

astigsen commented 5 years ago

I agree that we should change the default to do the diffing. It is a breaking change, but this is a good opportunity to introduce it.

cmelchior commented 5 years ago

We should coordinate that between all bindings IMO, so we all agree on what the default behavior is. That said I agree that diffed updates are probably the behavior that most people expect.