Comments (7)
➤ PM Bot commented:
Jira ticket: RDART-995
from realm-dart.
Did you make Entity.id
a primary key, when updating the schema?
from realm-dart.
Realm is complaining that there are multiple objects with the same id
after the migration, which is now illegal since it has become a primary key.
You need to remove all duplicates. The simplest thing is probably to just delete the realm entirely, if you can afford to loose the content.
from realm-dart.
Yes, it would affect any user who updates. You should only delete the realm, if you can afford to loose the data in it.
If you have customer data you need to preserve, then you need to either drop making id
unique, or remove duplicates explicitly in your migration callback to avoid the issue.
Is it by any chance so that all id
values are null
? If you added the id
column as part of the schema change, then it needs to be populated for all existing entries as part of the migration.
from realm-dart.
If you sort Entity
from oldRealm
on _id
you can find the duplicates.
from realm-dart.
Migration is currently only for local realms. See https://www.mongodb.com/docs/realm/sdk/flutter/realm-database/model-data/update-realm-object-schema/#updating-the-schema-of-a-synced-realm
Embedded objects are used for aggregate types. One advantage is that you don't have to setup dedicated subscriptions for embedded objects. They always follow their parent.
from realm-dart.
Can you post the error message with the full stack trace?
from realm-dart.
Related Issues (20)
- Support new hierarchical logger in Dart HOT 1
- Add support for RealmValue.fromJson HOT 1
- Add sync tests for collections in mixed HOT 1
- Expose an API that allows merging collections rather than replacing them HOT 1
- Two instances of Realm sync is delayed & end up in stale data. HOT 3
- Failed to load dynamic library 'librealm_dart.so' HOT 33
- New Model added to config are not working in isolate when syncing HOT 20
- Handle Role Changes without Client Reset HOT 1
- Add support for specifying initial subscriptions HOT 1
- Add support for schemaVersion in sync configs HOT 1
- After updating realm to 2.0, my dart_mappable objects with realm objects generate InvalidType now HOT 10
- Upgrade core to 14.4.1 HOT 1
- Ejson uses the name Key which is a name used in flutter foundation HOT 2
- Realm generator rejects const values saying initialization must be const HOT 8
- Custom Data Serialization (improvement) HOT 2
- Intermittent error: Could not resolve annotation for `class $Test`. HOT 11
- EJson export doesn't support backlinks HOT 2
- : [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RealmException: An exception occurred while executing a user-provided callback. See userException for more details: RealmException: Property '_id' does not exist on class 'AlmacenRealm' HOT 6
- Issues with unit testing using Realm: Failed to Load Dynamic Library Error HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realm-dart.