Hi Federico,

Thanks for your answers - I'm just having a bit of a hard time figuring out
which data store requests happen automatically.

I wondered because I had an error in the datastore:

  File "/base/data/home/apps/grindrservr/26.334331202299577521/main.py",
line 413, in query
    if result in meStatus.blocks:
  File "/base/python_lib/versions/1/google/appengine/api/datastore_types.py",
line 472, in __cmp__
    for elem in other.__reference.path().element_list():

The 'blocks' property is just like the 'favorites' described in my previous
mail - and 'result' is a value iterated over the results from a 'keys only'
query.

So I guess what I don't understand is why the datastore is in play here. I
know that my results is probably an iterator, but why is this necessary when
you just query for keys?
That's what caused be to think that the error might be related to the
'blocks' list of keys...

Sincerely,
/morten


On Sat, Jun 20, 2009 at 10:22 AM, Federico Builes <[email protected]
> wrote:

>
> Morten Bek Ditlevsen writes:
>  > Hi there,
>  > I have an entity with a list property containing keys:
>  >
>  >   favorites = db.ListProperty(db.Key, indexed=False)
>  >
>  > I suddenly came to wonder:
>  > If I check if a key is in the list like this:
>  >
>  > if thekey in user.favorites:
>  >
>  > will that by any chance try and fetch any entities in the user.favorites
>  > list?
>  >
>  > I don't think so, but I would like to make sure! :-)
>
> When you do foo in bar it's actually calling Python methods, not the
> datastore ops., and since
> Python sees favorites as a list of keys it should not fetch the entities.
>
> If you were to do index this and do it in datastore side ("WHERE favorites
> = thekey") it might have to
> "un-marshal" the property and do a normal lookup, but I don't think the
> slowdown is noticeable.
>
> --
> Federico
>
> >
>

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