you are missing some spaces in your filter():
d.filter('user =', user_key)
there is a space between property name ane =
> --
> 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-a...@googlegroups.com.
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
>
dont know if this is a typo but there is a strict syntax on how to query.you are missing some spaces in your filter():
d.filter('user =', user_key)
there is a space between property name ane =
On Mar 20, 2012, at 5:26 PM, Mike wrote:
> I am trying to use the filter() method based on a key argument. For
> example:
>
> user_key="agxkZXZ-emFiZXRhLTJyCgsSBFVzZXIYGAw"
> d=datamodel.Task.all()
> d.filter("user=",user_key)
> results=d.fetch(1024)
> This produces zero results, and its probably because the key isn't in
> the right format. If this where gql would I have to use the Key()
> function like this:
>
> db.gqlQuery("select * from Task where user=Key(:1)",user_key)
> However I don't think I can use the Key() function within a filter,
> but there must be some python functional equivalent... Is there a way
> to properly format a key to be used within the filter() method?
>
> User is defined as:
> user = db.ReferenceProperty(None)
>
> --
> 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+unsubscribe@googlegroups.com.