title: Firebase: setPersistenceEnabled(true) prevents data from being available
body: <p>In my app, I have two different activities, one storing data ("suggestions") to a Firebase database:</p>
  
  <pre><code>DatabaseReference suggestRef = FirebaseDatabase.getInstance().getReference().child("suggestion").child(someID).push().child("name");
  suggestRef.setValue(suggestion);
  </code></pre>
  
  <p>and a second activity where a single of these suggestions is loaded and displayed for a moderator to accept or delete:</p>
  
  <pre><code>DatabaseReference suggestRef = FirebaseDatabase.getInstance().getReference().child("suggestion");
  Query suggestQuery = suggestRef.limitToFirst(1);
  
  suggestQuery.addListenerForSingleValueEvent(new ValueEventListener() {
      @Override
      public void onDataChange(DataSnapshot dataSnapshot) {
  
      //...
  
      }
  </code></pre>
  
  <p>Note that, when reading from the database, I'm accessing a parent location to where I write. This is because "someID" can be anything - and because more than one suggestion could be added for any value of "someID", I'm adding random child nodes via push() there. This is not the problem, I'm getting child nodes of the referenced node in the onDataChange() callback.</p>
  
  <p>In any case, writing definitely works (checked via the web view of the database), as does accessing the node again - as long as I <strong>don't</strong> setPersistenceEnabled() for the database.</p>
  
  <p>If I do, writing still works, but subsequently reading returns a null value at the referenced location.</p>
  
  <p>Running the app again without persistence makes the data available - running with persistence later makes it unavailable again.</p>
  
  <p>What am I doing wrong?</p>