Another benefit is that you can do an ancestor query without a kind. i.e. show all descendants of an entity regardless of their kinds. Also you can query for descendants regardless of whether they are direct descendants (children) or not (e.g. grandchildren). I guess you could simulate the last point with a range query but you would then not be able to add another inequality filter.
Twig makes it easy to define an object reference as a parent, child or independent entity without dealing with Keys at all. This makes working with Entity Groups and transactions a breeze http://code.google.com/p/twig-persist/ and you can still easily use low-level queries. On Oct 29, 6:21 pm, Roy Smith <[email protected]> wrote: > Resistance is futile :-) > > It only enforces referential integrity in that you specify the parent at > entity creation time. LLAPI does NOT prevent you subsequently deleting a > parent and thus orphaning the child. > > The main benefit is that the 2 entities formed as a parent/child in this way > form an entity group and thus may be involved in an atomic transaction. This > is also the downside in that there is a persistence overhead when persisting > am entity group. > > So it depends on your application whether you should manually maintain your > own relationships using foreign keys (cheap, but no transactions) or use > LLAPI (expensive but supports transactions). > > If you google this group for "entity group", and also the GAE documentation > you will see a lot of discussion. > > > > On Thu, Oct 29, 2009 at 11:00 AM, K.Honsali <[email protected]> wrote: > > > typo: desired issue => desired value > > > On 29 oct, 11:58, "K.Honsali" <[email protected]> wrote: > > > Salaam, > > > > Using the low-level datastore api; > > > > I have some resistance understanding the benefit of instantiating an > > > Entity with a parent Key. > > > Since I can just set a property , ParentId , with the desired issue. > > > > Does BigTable ensure integrity constraints if I indicate the parent > > > Key using the former method? > > > > Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
