Android SDK
I’m trying to fetch the user details from Realm db by querying on one of the fields, for some reason the result is always null.Anything i’m missing
User userModel = realm.where(User.class).equalTo("firebaseAuthUserId", firebaseID).findFirst();
if(userModel != null && userModel.isValid()) {
completionUser.onSuccess(userModel);
}
else {
completionUser.onFail("User does not found");
}
Let me tell u the complete scenario:
We have old user data in Realm db and have migrated that db to Realm mongodb.
When the old user tries to login it will fail since that user is not present in Auth of Realm.
Forecefully register that user in Auth, use the above query to fetch the user details based on the primarykey of user table and login
Follow up to the following question: