> No, Google is doing the right thing.  Fetching anything other than the
> current value of the entity would be counter intuitive.  Few people
> would expect your example to print anything other than "John", the
> value that's actually stored in the datastore.   Remember also that
> the datastore supports concurrent access, so it's possible for your
> example to print something else entirely if the entity happens to get
> updated by another request.

I respectfully disagree, unless it's true that relatively "few" GAE
developers have any experience with Hibernate or the Java Persistence
API.  And I'm pretty sure Rails also has an entity cache built into
ActiveRecord these days.

In my opinion, the current value of the entity (*in the current
context*) has the name "Doe".  I would argue that it makes a lot of
sense to have only one instance of an entity fetched and loaded in any
persistence context (which could be easily defined in GAE as a request/
response cycle).  And if one is concerned about datastore contention
and latency, as Google obviously is, this is pretty crucial.  Imagine
the behaviour of the following code in a system with a level 1 context
cache and and one without:

for son in father.son_set:
  print son.father.name, son.name

I'm a bit rusty with my theory, but I believe that'd be O(1) vs O(n)
on datastore acces.  This is obviously a contrived example that can
easily be worked around, but the pattern is nevertheless a very common
one.

> > And I'd still like to be able to have a datastore access log.
>
> Try poking around the dev server source and adding some appropriate
> logging statements.

That's a good idea.  I wonder if I can rely on the dev and production
systems being similar enough for this to be accurate.

Thanks for the reply,
Jeff
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to