Assuming that you mean None with null your query to return the 296 entities should look like
q = Joke.all() q.filter('content =', None) # <-- None without quotes! Andi On Tue, Jul 6, 2010 at 3:13 PM, xinxin zhou <sdzhouxin...@gmail.com> wrote: > class Joke(db.Model): > url = db.TextProperty() > content = db.StringProperty(multiline=True) > keyword= db.StringListProperty(); > > i want to find entities whose content is not null. > there is 300 entities totally. the content of 4 entities are not null,the > content of 296 entities are null > i have tried the code following: > q = Joke.all() > q.filter('content !=', 'None') > return 296 entities > q = db.GqlQuery("SELECT * FROM Joke where content!=null") > return 0 entities > q = db.GqlQuery("SELECT * FROM Joke where content=null") > return 296 entities > q = db.GqlQuery("SELECT * FROM Joke where content != null") > return 0 entities > > sorry for poor english and any advice is appreciated. > > -- > 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=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-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=en.