query = Cat.all().filter('name =','c').filter('year
=',2009).filter('month =',1)
Gives a Query object as return, not a [].
you have to fetch() or get() from this query
query.fetch(limit=100)
query.get() # get the first one
2009/1/20 dd <[email protected]>:
> i have a record like :
> c = Cat(name='c',year=2009,month=1)
> , i want to query and get this record,so i use:
> Cat.all().filter('name =','c').filter('year =',2009).filter('month =',1)
> ,and get nothing.the result is [].
> does not the query get the record Cat(name='d',year=2009,month=1)?
> what is wrong with my comprehension?? and why??
> thx!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---