[google-appengine] Re: filter based on Child Entity

2008-09-17 Thread Marzia Niccolai
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 = d

[google-appengine] Re: filter based on Child Entity

2008-09-17 Thread Arun Shanker Prasad
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 =

[google-appengine] Re: filter based on Child Entity

2008-09-17 Thread Marzia Niccolai
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 P

[google-appengine] Re: filter based on Child Entity

2008-09-18 Thread Arun Shanker Prasad
Hi Marzia, Thanks for the reply. In my particular situation I needed a list of Authors who have the favGenre='Sci-Fi'.. If I am not able to do that during the query itself, I might have to think about doing some filtering on the result and sending it on to the template Thanks, Arun Shanker

[google-appengine] Re: filter based on Child Entity

2008-09-18 Thread José Oliver Segura
why not adding a ListProperty to Author which holds the list of genres for that author? Of course, you need to keep it updated in each Create/Update/Delete of books associated with that author, but it would allow you to query just for author.favgenre='sci-fi'. Maybe it looks strange coming