Is it possible to query an equality filter on a list property and order the results by another property?

6 views
Skip to first unread message

Albert

unread,
Jul 23, 2010, 9:35:06 PM7/23/10
to Google App Engine
Hi!

I have a sample model like this.

Class Entity(db.Model):

tags = ListProperty()
weight = IntegerProperty()


Is the following query possible on appengine?

SELECT * FROM Entity WHERE tags = :some_tag
ORDER BY weight


Thanks!

Harshal Patil

unread,
Jul 23, 2010, 10:18:58 PM7/23/10
to google-a...@googlegroups.com
Should be possible. You should be getting list of objects of type Entity ordered by weight having 'some_tag' in each of their 'tags' field. 




--
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-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.


Albert

unread,
Jul 25, 2010, 6:07:00 PM7/25/10
to Google App Engine
Great! Thanks!

On Jul 24, 10:18 am, Harshal <p.hars...@gmail.com> wrote:
> Should be possible. You should be getting list of objects of type Entity
> ordered by weight having 'some_tag' in each of their 'tags' field.
>
>
>
> On Sat, Jul 24, 2010 at 7:05 AM, Albert <albertpa...@gmail.com> wrote:
> > Hi!
>
> > I have a sample model like this.
>
> > Class Entity(db.Model):
>
> > tags = ListProperty()
> > weight = IntegerProperty()
>
> > Is the following query possible on appengine?
>
> > SELECT * FROM Entity WHERE tags = :some_tag
> >                       ORDER BY weight
>
> > Thanks!
>
> > --
> > 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-a...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengi...@googlegroups.com<google-appengine%2Bunsubscrib e...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages