In the latest WildAid O-FISH app example, I see that @Andrew_Morgan has specified that we will be using agency
as the partition key and I can see that in the Atlas document from the post.
{
"_id" : ObjectId("6059c9859a545bbceeb9e881"),
"agency" : "Ecuadorian Galapagos", // This is the partition key
"date" : ISODate("2021-03-23T10:57:09.777Z"),
"status" : "At Sea",
"user" : {
"email" : "global-admin@clusterdb.com",
"name" : {
"first" : "Global",
"last" : "Admin"
}
}
}
However, what I fail to understand is that the same partition key is not present in the Swift / Kotlin Realm objects.
import RealmSwift
class DutyChange: Object {
@objc dynamic var _id: ObjectId = ObjectId.generate()
@objc dynamic var user: User? = User()
@objc dynamic var date = Date()
@objc dynamic var status = ""
override static func primaryKey() -> String? {
return "_id"
}
}
Is this done for the brevity of the example or is it not recommended to have the partition key on the client side? Currently, I’ve a RChat like partitioning scheme and I set the values from my client app.