Hi! I’m using realm sync with partitions in which the user will have different data for every of his devices. I’ve created a composite partition key that looks like this:
“owner_id=xxxx&store_id=yyyy”
This works fine. Owner id is the realm user id. store_id is the Id of the device.
But, I’m also developing a webapp that will allow to check all the records from that user, without the need to set any store/device. That means that I will only filter by this part:
“owner_id=xxxx”
Now, it is a good idea for the queries to use partial lookup like this:
db.collection.find({"user_id": /xxxx/})
Or for this case it would be better if I have a separated owner_id field (with index) and lookup for that field directly when I only need to use that value?