Key names must be unique for a given kind and parent. If you do the
following:

---
for i in range(100):
  MyEntity(key_name='foo', value=i).put()
---

you are overwriting the entity with key name 'foo' repeatedly with new
values. Only the last one is stored.

-Nick Johnson

On Thu, Nov 12, 2009 at 3:23 AM, Baron <richar...@gmail.com> wrote:

>
> yes I am creating a single entity with that key_name for all my
> records (~100000). This also lets me use transactions on my records
> now.
>
> > a big fail if you want to use the datastore to, well, store data.
> What side effects will this cause? - degraded response time?
>
> Richard
>
>
> On Nov 12, 4:40 am, Wooble <geoffsp...@gmail.com> wrote:
> > On Nov 11, 8:43 am, Baron <richar...@gmail.com> wrote:
> >
> > > can I use entities to speed up deleting? It seems when I give all my
> > > model instances the same key_name the deleting is much faster because
> > > "MyModel.all(keys_only=True)" returns only a single record now.
> > > Am I missing something here?
> >
> > Ummm... it sounds like you're only creating a single entity.  This is
> > absolutely great if you want to delete it, and probably a big fail if
> > you want to use the datastore to, well, store data.
> --~--~---------~--~----~------------~-------~--~----~
> 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<google-appengine%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--

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-appeng...@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=.


Reply via email to