I have: 

Class MyObject {
    List<Key<B>> relatedKeys;
}

Let us say my datastore contains a MyObject, which contains key (keyB) in 
"relatedKeys" 

Code:

public void removeKey(Key<MyObject> keyToMyObject, Key<B> keyB) {
    MyObject myObject = ofy().load().key(keyToMyObject).now();
    assertTrue(myObject.relatedKeys.size() == 1, "Error");
    myObject.relatedKeys.remove(keyB);
    ofy().save().entity(myObject).now();
 
    // And just to be sure
    assertTrue(ofy().load().key(keyToMyObject).now().relatedKeys.size() == 
0, "Error");
}

// Next, I do a new API-call which loads the object again

MyObject myObject = ofy().load().key(keyToMyObject).now();

// Sometimes, myObject still contains keyB in the list. But what is really 
strange is that the object in the Development Console is correct 
(relatedKeys is empty)
// It does not help if i try to reload the query. The only thing that helps 
is to run removeKey again

Am I doing something wrong? Is the Development console loading entities in 
another way, since the datas there are correct?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to