This won’t compile, but I need it to:
class Foo: Object, ObjectKeyIdentifiable { @Persisted(primaryKey: true) var _id: ObjectId @Persisted var id: Int? @Persisted var name: String? }
The compile time error is: Invalid redeclaration of synthesized property ‘_id’
‘_id’ synthesized for property wrapper backing storage
Options? I’m using Realm Sync with Atlas, so _id is required to be there, plus I need “id” to exist because the relational backend code on that’s also talking to Atlas has defined that field for its use, and I can’t change it.
Should I not use the property wrapper and go back to @objc dynamic var and RealmProperty and so forth?
Thanks!