For example we have these models:
class People extends RealmObject {
@PrimaryKey
long peopleId;
long dogId; //Should we include dogId or not? what is the best practice?
Dog dog;
}
class Dog extends RealmObject {
@PrimaryKey
long dogId;
}
In my case People can only have one Dog.
I have seen some people include 'dogId' explicitly while also having 'dog' as member of 'People' model.
And some are not.
What is the best practice for this relationship? Should we explicitly include primarkey from other model or not?
Thank you,
Reza