Hi,
For a given application, I have to perform datastore transactions on
entities which have no parent. Unless I misunderstood, this is not possible.
In order to avoid creating dummy entities in the datastore, I am creating a
"fake ancestor" key to an entity that does not exists in the datastore.
I would have two questions related to this :
--> Is there any other solution to have transactions with no entity being
the parent ?
--> Will this solution be supported in the long-term by Google ? Just would
like to avoid being in a dead-end when an upgrade is rolled-out.
public class AAA {
@Parent Key<AAA> ancestorKey; // This is a hack to make sure we can
support transactions
@Id Long Id;
// OTHER FIELDS
public static Key<AAA> getAncestorKey() {
return( new Key<AAA> (AAA.class, new Long("1")));
}
}
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/8_pIKHr_IiYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.