Ross Ridge writes
> 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.

Jeff Nichols wrote:
> I respectfully disagree, unless it's true that relatively "few" GAE
> developers have any experience with Hibernate or the Java
> Persistence API.

I'm pretty sure few have, and of those I doubt that many would think
that the datastore is supposed to behave like a object persistence
mechanism.  The usual misconceptions about the datastore usually are
the result of thinking that it's supposed to behave like an SQL
database.

> In my opinion, the current value of the entity (*in the current
> context*) has the name "Doe".

Well, it doesn't.  An entity is something that exists in the
datastore.  Only the Model instance has the name "Doe".  The entity
won't have that name until you use the put() method to update it.

> 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.

It would be O(n) either way.  Those two lines of code result in "2n"
enties fetched, where n is the number of entities matched by
father.son_set, while if father was cached it would require "n"
fetches.

> 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.

I believe they're using the same code up until the RPC call.

                                Ross Ridge

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
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