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

  • SEARCH
  • Home
  • 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 7182531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:47:25+00:00 2026-05-28T17:47:25+00:00

I need orders / purchases that allow many items for instance something like class

  • 0

I need orders / purchases that allow many items for instance something like

class Purchase(db.Model):
  '''a completed transaction'''
  item = db.ReferenceProperty(Item, repeated=True))

Is the repeated keyword legal and used in the correct manner here? What are my other options? Should I do it with a repeated stringproperty instead?

item_ids = model.StringProperty(repeated=True)
or with repeated KeyProperties?
Thanks

  • 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-28T17:47:26+00:00Added an answer on May 28, 2026 at 5:47 pm

    There is a ListProperty:

    class Purchase(db.Model):
        items = db.ListProperty(db.Key)
    

    It is used like a python list:

    p = Purchase()
    p.items = [item1.key(), item2.key(), item3.key()]
    

    In queries however it looks like a single-valued field. Every value of ListProperty is indexed separately.

    Query below will return all purchases which contain the item1:

    Purchase.all().filter('items =', item1.key())
    

    Query below will return all purchases which contain either item1 or item2:

    Purchase.all().wilter('items IN', [item1.key(), item2.key()])
    

    If you will ever need to index more than one ListProperty don’t forget to familiarize your self with exploding-indexes.

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

Sidebar

Related Questions

I need to import sheets which look like the following: March Orders ***Empty Row
I work with a client that is using purchase orders, and a custom order's
I have the need for sql based library that will allow me to create
I have a Database that has the following relations: Transaction->Purchase->Item->Schedule Transaction - self explanitory
I'm building a Page Tab application that will allow Facebook users to make purchases
Ok need some help, I have a system I'm creating that will allow users
I need to look up all households with orders. I don't care about the
I'm in need of some basic TSQL help. Here's my table layout: Orders Table
I need to order by 2 columns using the entity framework. How is that
I want to load a client object and then pull their related purchase orders

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.