Hi Arun, You can't filter as you've described. What you'll have to do is something like:
my_author = Author.search('Roddenberry').get() profiles = AuthorProfile.filter('author =', my_author).filter('favGenre =', 'scifi') -Marzia On Wed, Sep 17, 2008 at 12:43 PM, Arun Shanker Prasad < [EMAIL PROTECTED]> wrote: > > Hi Marzia, > > Thanks for the reply. But I made a mistake, Sorry for that, my example > was wrong.... > I was looking at something like,, > > Author(search.SearchableModel) > name = db.StringProperty() > location= db.StringProperty() > > AuthorProfile(db.Model) > description = db.StringProperty() > favGenre = db.StringProperty() > recognitions = db.StringProperty() > author = db.ReferenceProperty(Author) > > I was kind of looking for a list of authors like,, > > authors = Author.search('Roddenberry').filter('AuthorProfile.favGenre > =', 'Sci-Fi') > > Thanks, > Arun Shanker Prasad. > > On Sep 17, 10:29 am, "Marzia Niccolai" <[EMAIL PROTECTED]> wrote: > > Hi, > > > > From your description, I'm not sure that you need to use entity groups > and > > the parent child relationship for this problem. > > > > For example, let's say you are looking for articles about 'science' by > > author 'jane smith'. > > > > I might model it as such: > > > > Article(search.SearchableModel) > > description = db.StringProperty() > > author = db.ReferenceProperty(Author) > > > > Author(db.Model) > > name = db.StringProperty() > > > > And to query: > > > > author = Author.filter('name =', 'jane smith').get() > > > > results = Article.search('science').filter('author =', author) > > > > Hope this helps, > > Marzia > > > > On Wed, Sep 17, 2008 at 7:00 AM, Arun Shanker Prasad < > > > > [EMAIL PROTECTED]> wrote: > > > > > Hi All, > > > > > First of all let me give an idea about my sit.. > > > I have a parent entity which is a search.SearchableModel and a child > > > with db.Model. > > > I have a situation in which I get the list of values from the parent > > > entity. I need to filter the results based on a property in the child > > > entity. > > > > > Like search Article entity using query.search() and filter based on > > > Author.name > > > > > Any Help would be 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-appengine@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---