Hi,

This should work just like this:

my_fee = Feel.all().filter('prop2 =' 11).get()
foos = Foo.all().filter('my_items =', my_feel).fetch(10)

-Marzia

On Wed, Mar 4, 2009 at 8:19 PM, Devel63 <[email protected]> wrote:

>
> Is it possible to filter against a named reference collection?  The
> datastore doesn't complain, but I never get any results...
>
> class Foo(search.SearchableModel):
>  prop1 = TextProperty()
>
> class Fee(db.Model):
>  prop2 = db.IntegerProperty()
>  prop3 = db.ReferenceProperty(Foo, collection_name='my_items')
>
> my_fee = Fee.all().filter('prop2 =', 11).get()
> foos = Foo.all().filter('my_items =', my_fee.key())
>
> I have tried every variation I can think of: using keys as above,
> using my_fee directly without the key call, putting a str() around the
> key, etc.).  I think I saw it work once or twice, but now I'm not sure
> if that was just an illusion, and I can't replicate it.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to