Thank you Ikai! > > I have the parent key. Theoretically speaking, it is the only thing > > needed to maintain parent child relationship. MyList class may have > > more fields I don't need at all. So, I'd like to avoid reading them to > > memory. > > You can do this with KeyFactory.Builder. Build a Key using the parent and > child Keys, then query using this Key. You can also use an ancestor query to > find multiple child items. >
Yes, I use key builder when I query children. I'm asking about adding a new child. The problem is - child key is auto generated by data store, I don't know key until I save child object. To save child object I need to add it to the parent, which means I have to load the parent object and call something like parent.getList().add(child); Does it mean with auto generated id I always have to load parent object first? Thank you, Andrey -- 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 [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-java?hl=en.
