I am trying to migrate Java objects to a GAE data store.
I'm not sure how to save an object having a ("non-trivial") reference object. That is, suppose I have the following.
public class Father { String name; int age; Vector<Child> offsprings; //this is what I call "non-trivial" reference //ctor, getters, setters... } public class Child { String name; int age; Father father; //this is what I call "non-trivial" reference //ctor, getters, setters... }
The name field is unique in each type of domain and is considered the Primary Key.
To save the "trivial" (String, int) fields, I only need to add the correct annotation. So far, so good. However, I do not understand how I should persist in homes ("Child, father"). Should I:
I read all the white papers / GAE example. Throughout the entire time, they always retain the “trivial” links supported by this repository (for example, in the Guest Book example, only the Lines and Long lines).
java google-app-engine google-cloud-datastore
David
source share