I am having trouble understanding how to structure an ancestor tree with several decedents. Suppose I have a model like this (every Entity has a Long id
):
Based on the info provided you have two options:
Note: after writing this all out, I realized the end API looks the same really either way:
GET /user/{key} - get user info
POST /user/{key}/post/ - create post
GET /post/{key} - get post
POST /post/{key}/comment/ - create comment
GET /comment/{key}
In this case, {key} is the websafe key.
Advantages:
In this case {key} is the id, and there is no entity hierarchy
Dis/Advantages:
In my experience you should absolutely do the first option, you will probably get your data model wrong a few times, and being able to change/migrate it is an absolute win.