Because it's not possible. Doing so would require a join, which isn't
supported in the App Engine datastore. You need to denormalize your model,
and bring model1field in as a property of Model2.

-Nick Johnson

On Mon, Apr 6, 2009 at 11:42 AM, PJ Fitzpatrick <
[email protected]> wrote:

> Hi,
> Ahead of my talk on wednesday there is one thing i cannot seem to
> understand about queries in App Engine. Has anyone got an answer to the
> following.
>
>
> I am attempting to query as follows;
>
> class Model1.(db.Model)
> model1field = db.StringProperty()
>
> class Model2(db.Model)
> model1 = db.ReferenceProperty(Model1)
>
> q= Model2.all()
> q.filter("model1.model1field =", somestring)
>
> Why does this not work?
>
> tks,
> PJ
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Python Ireland" 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.ie/group/pythonireland?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to