Using the Datastore viewer, I see my child entity right after it is created 
via my application.  Next, the user updates a couple fields on the child 
entity and saves it.   However the Datastore viewer no longer "sees" the 
entity!  I see no processing or transaction errors in the logs.    I do see 
the parent's child collection field appears to still contain the child ala:

[datastore_types.Key.from_path(u'Parent', u'1527525075', u'Child', 
5799236641751040L, _app=u's~myapp')]

In fact, the user still sees the relationship in the application!  But... 
 When I redeploy a newer version of the app, or the memcache is cleared 
(and the browser is closed) even the parent's child collection field is 
reset to it's previous value.  

So, the child entity is clearly hanging out in memory, but I don't 
understand why it doesn't appear in the database?

BTW, this functionality used to work prior to upgrading from the appengine 
SDK from 1.7.5 to 1.8.1.1, and now 1.8.2.   I use Java with JDO for 
persistence.  

This is the definition for the child collection in the parent class:
  
  @Persistent(dependentElement="true")
  private Set<Child> children; 

This is the definition of the child:
@PersistenceCapable(identityType=IdentityType.APPLICATION, 
detachable="true")
public class Child implements Serializable, Comparable<Child> 
{

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Key key;

The children are detached for the update processing by the user.  I ensure 
the parent has the new child in it's collection.  I then save the child, 
then the parent.

This is quite perplexing and driving me crazy as this all used to work!   
Does anyone have any ideas?

-- 
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/groups/opt_out.


Reply via email to