Just a note, "get an entity that matches the keywords I supply" is
_not_ what Model.get_or_insert does.  It fetches the entity with the
given key name, and if and only if the entity does not exist it will
create one with the given arguments.



Robert





On Sat, Mar 5, 2011 at 11:50, Ram Rachum <ram.rac...@gmail.com> wrote:
> Hello,
> I'm very confused about the whole key and key-name thing in GAE.
> What's the job of the key-name? Is this documented anywhere? I couldn't find
> it in the docs.
> For example, when I use `Model.get_or_insert`, why do I need to provide a
> `key_name`? I want to get an entity that matches the keywords I supply, or
> create one if one doesn't exist. Why do I need to put in a key name? What
> does it do? Is it stored on the object somehow? What will happen if I put in
> "bla bla bla"?
>
> Frustratedly yours,
> Ram.
>
> --
> 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
> google-appengine+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://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 google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to