> In your case each root for an entity group could easily be a user. Would making an individual user a "root for an entity group" make my data model unwieldy? There is the possibility that a given user may be registered to use more than one account although he would only have access to one account per session. I want to cleanly "partition" account data so that there is no chance of a bug or something causing data from one account to be inadvertently exposed to another. This also makes it very easy to add and delete accounts.
> You don't appear to need any transaction isolation beyond that. > Having said that you may not need transaction isolation at that > level. Within each user, data for the year in encapsulated in a non-trivial schema and any changes to data will require "all-or-nothing" transaction isolation. While individual users will typically manipulate or view their own data. There are special users, with "manager" privileges who will be able to manipulate data for more than one user. If two managers happen to access the same user's data at the same time, I need to prevent them from "stomping" on each other > > Any entity can be it's own entity group root by not defining an > ancestor in the key. So you can control the extent of the > entity groups scope to where you need to control transactions. Okay, This may be the nub of my confusion. Are the "data storage" hierarchies and the "data model/class" hierarchies two different things? Basically, what you are saying is that by not defining an "ancestor" for my user data in a given year, I am effectively putting that data in its own entity group, which is what I want. But how do I reconcile this with my "conceptual" data model? For example, if my user data has no ancestor, how do I retrieve user data for a given account without adding a redundant account field to the user data and filtering by account? There is also the danger here of not having clean "partitioning" of data between accounts and some bug or other might expose data from one account to another. Another related question: Are there hard limits on the number of entity groups? > > So I would look at where you updates are coming from and the > likelyhood and concurrent updates stomping on each other, > > Rgds > > T > > On May 17, 8:29 pm, Jaroslav Záruba <[email protected]> wrote: > > > > > Hi > > > Disclaimer: I don't have the ambition to clear this up to you. :) > > > On Mon, May 17, 2010 at 2:16 PM, rvjcallanan <[email protected]> wrote: > > > ... > > > > A logical class hierarchy would look something like this: > > > Accounts > > > > -->Users > > > ---->Years > > > ------>UserDataSchema > > > > Yet, according to GAE documentation, this is one big humongous Entity > > > Group (with Accounts at the root) which would fall over on itself as > > > local copies are maintained and transaction isolation is enforced. > > > Is there a reason why you can't have each Account as a root entity? (Instead > > of having one "bhEG". :) > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-appengine%2Bunsubscrib > > [email protected]> > > . > > For more options, visit this group > > athttp://groups.google.com/group/google-appengine?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine" 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 > > athttp://groups.google.com/group/google-appengine?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" 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 > athttp://groups.google.com/group/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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?hl=en.
