title: Save entity to Datastore and return it so that any further queries to the same entity are guaranteed to reflect the new updates
body: <p>I want to load an entity by key, update it, save it back to Datastore and then return it to the client from an endpoint. However, I want to make absolutely sure that when I return the entity to the client, the updated entity has been saved and propagated across the datastore. This way, if the client queries for that entity with another endpoint immediately after, the updated one will return.</p>
  <p>Using Objectify, this is what I have so far:</p>
  <p>First I load the entity, update some values and then load it again by the entity key and return it. Will this second load and return of the entity be strongly consistent and reflect the new value?</p>
  <pre><code>// Load the entity by key
  Key&lt;Thing&gt; thingKey = Key.create(Thing.class, id);
  Thing thing = ofy().load().key(thingKey).now();
  
  // Update some values
  thing.setSomeProperty(&quot;new value&quot;);
  
  // Save entity
  ofy().save().entity(thing);
  
  // Load entity by key - will this loaded entity be guaranteed to reflect the above update?
  return ofy().load().key(thingKey).now();
  </code></pre>
  <p>Note: I do not want to return the local entity I set the new values to because I do not want the client to potentially query for the entity with the new updates and not get it because they haven't been committed yet due to eventual consistency.</p>
  <p>Could this below be another option to achieve the same effect?</p>
  <pre><code>// Load the entity by key
  Key&lt;Thing&gt; thingKey = Key.create(Thing.class, id);
  Thing thing = ofy().load().key(thingKey).now();
  
  // Update some values
  thing.setSomeProperty(&quot;new value&quot;);
  
  // Will this save wait until the entity is saved/propagated across the datastore and thus any queries to this entity after this statement will reflect the new update?
  ofy().save().entity(thing).now();
  
  // Just return the entity we updated
  return thing
  </code></pre>