I'm a newbie of programming Android apps, specially using Firebase platform. I have to store two different values into two different children of the same root node on a Firebase RealTime Database. I'm using the setValue() method but the problem is that the first invocation works, while the second one doesn't have effect. I paste the relative part of code hoping it will be useful for a better view of the environment. Did I make any mistake?
public Boolean store() {
mDatabase = FirebaseDatabase.getInstance().getReference();
mDatabase.child("posts").push().setValue(this); //it has effect
mDatabase.child("groups").push().setValue(this.author); //it hasn't effect
return true;
}