Figured it out, just create the the child entity with: Entity child = new Entity("Child", parentKey); children.add(child); ds.put(children)
On Apr 3, 5:42 pm, mattkrae34 <matt.krae...@gmail.com> wrote: > I'm trying to use to the new remote_api features to upload data. What > is the best way to upload a parent with a list of owned children. > > Class Parent has List<Child> children > > I tried uploading the Parent and using its key to create Keys for each > of the children. > > child.setProperty("key", KeyFactory.createKey(parentKey, "Child", > null)); > > The KeyFactory call won't let "name = null" (even though all the > existing entities have name = null) so I set name to an arbitrary > string. When I did that the Parent and children were created but the > Parents list of children was empty. So the association between the > parent and children did not happen. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.