How do you guys match your java realm objects with swift realm objects?
My realm development started with Swift so the object server contains data migrated from swift. I then created my android version using Java (with models from Realm Studio).
Swift:
class OrderItem: Object {
@objc dynamic var id: String = ""
}
Java
public class OrderItem extends RealmObject {
// @PrimaryKey
private String id;
}
Error without @PrimaryKey:
Bad changeset received: Schema mismatch: 'OrderItem' has a primary key on one side, but not on the other.
Error with @PrimaryKey:
Exception has been thrown: The following changes cannot be made in additive-only schema mode: Primary Key for class 'OrderItem' has been added.
Any ideas how to fix these errors?