title: [GAE - Objectify]: LinkedHashMap doesn't respect key's order
body: <p>I'm working with Objectify to access DataStore in a Google App Engine application.</p>
  
  <p>I have 2 Entities:</p>
  
  <pre><code>@Entity
  public class Client {
      @Id String id;
  }
  
  @Entity
  public class Queue {
      @Index @Id String name;     
      @Load LinkedHashMap&lt;String,Ref&lt;Client&gt;&gt; clientsInQueue;
  }
  </code></pre>
  
  <p>In a transaction, i do something like this:</p>
  
  <pre><code>Client newClient = new Client(...);
  ofy().save().entity(newClient);
  
  Queue selectedQueue = ofy().load().type(Queue.class).id(queueName).now();
  selectedQueue.getClientsInQueue().put(newClient.getId(), Ref.create(newClient));
  </code></pre>
  
  <p>But when i try to print all the elements in the LinkedHashMap, i noticed the elements is in the exactly <strong>reverse</strong> order.</p>
  
  <p>For example if i add 2 Clients in the LinkedHashMap and save it, like this:</p>
  
  <pre><code>Queue selectedQueue = new LinkedHashMap&lt;String,Ref&lt;Client&gt;&gt;();
  String id1 = "id1";
  Client c1 = new Client(id1);
  ofy().save().entity(c1);    
  String id2 = "id2"
  Client c2 = new Client(id2);
  ofy().save().entity(c2);    
  
  selectedQueue.getClientsInQueue().put(c1.getId(), Ref.create(c1)); 
  selectedQueue.getClientsInQueue().put(c2.getId(), Ref.create(c2));
  ofy().save().entity(selectedQueue); 
  
  Set&lt;String&gt; keys = selectedQueue.getClientsInQueue().keySet();
  
  for(String key : keys){
      Client c= selectedQueue.getClientsInQueue().get(key).get();
      log.info("id: "+c.getId());
  }
  </code></pre>
  
  <p>The result is:</p>
  
  <p>id: id2</p>
  
  <p>id: id1</p>
  
  <p>Why i obtain this behavior ? I know that LinkedHashMap has to maintain the order of the keys! Is there any problem to use LinkedHashMap with GAE DataStore?</p>
  
  <p>Thanks in advance.
  Cheers,
  Alessandro.</p>