Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 996401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:52:16+00:00 2026-05-16T06:52:16+00:00

A sample model: class Foo(db.Model): id = db.IntegerProperty() bar = db.ListProperty(int, required=True) How can

  • 0

A sample model:

  class Foo(db.Model):
     id = db.IntegerProperty()
     bar = db.ListProperty(int, required=True)
  1. How can I query using either Query or GqlQuery to return all Foo entities that have a given value in their bar property?

  2. If I have a list of ids, is there a single filter that will return all entities whose id property is in that list?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T06:52:17+00:00Added an answer on May 16, 2026 at 6:52 am

    1.

    If you use an equals query on a list property, it will check all items in the list:

    search = 2
    results = Foo.all().filter('bar =', search).fetch()
    

    2.

    You can use an IN filter, but note that internally this makes a datastore query for each item in the list, so it may be slow, and there are also a maximum of 30 internal queries per request.

    items = [1, 2, 3]
    results = Foo.all().filter("id IN", items).fetch()
    

    See Introducing Queries for details for both 1 and 2, and ListProperty for further details on 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is a sample model: class FooModel(models.Model): foo = models.DecimalField(max_digits=6, decimal_places=3, null=True) Serialize: from
I'm working with a model: class Foo(models.Model): name = models.CharField(max_length=255) bars = models.ManyToManyField('Bar') In
Here's sample model classes, which being use with Entity Framework Code First: public class
Am trying to construct a simple update query in my model class Model_DbTable_Account extends
I have the following sample code. class bar is derived from the base class
Assume I have such simple model: class Foo(models.Model): name = models.CharField(max_length=25) b_date = models.DateField()
Simple Rails question. I have a model Foo which looks like this: class Foo
I've got a field in one model like: class Sample(models.Model): date = fields.DateField(auto_now=False) Now,
My model: class Sample(models.Model): users = models.ManyToManyField(User) I want to save both user1 and
If I have an db.Model object such as: class Foo(db.Model): title = db.StringProperty() bars

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.