Andy,

Whether the identical key_name value results in
writing a new entity that destroys the existing one,
or it only overwrites the altered fields of the
existing old entity, is Ok with me. The result
seems very similar if not identical. So I am
happy with this aspect of my application.

Thanks,

Brian in Atlanta

On May 30, 10:34 pm, Andy Freeman <[email protected]> wrote:
> > "If an instance has been stored before, the put() method updates the
> > existing entity."
>
> As I wrote, Message(handle=handle,owner=person.key())" makes a new
> instance.  It's a constructor - it makes a new instance regardless of
> what the arguments are.  A new instance, by definition, has not been
> stored before.  (No, putting an instance made by calling the
> constructor with the same arguments does not change what db.Model
> subclass constructors do.  Constructors make new instances.  The only
> exception to that rule doesn't apply here.)
>
> If you use key_name and parent, the constructor will make a new
> instance with a specific key.  If there is a stored entity with that
> key, putting said instance will overwrite the previously stored
> entity.
>
> However, that the sentence quoted above does not apply in that
> situation because a new instance is not an instance that has been
> stored before.
>

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