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 6738905
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:25:25+00:00 2026-05-26T11:25:25+00:00

I have a little application where I am passing messages between users. My model

  • 0

I have a little application where I am passing messages between users. My model for the message is like this

class Message(db.Model):
    from = db.UserProperty()
    sent_to_users = db.ListProperty(db.Key)

I send the message to users if they are online, so when I detect that a user is online I send any message that has not already been sent to them. I do message.sent_to_users.append(user) in the /chat/presence/available handler. To indicate that a message has already been sent to user

My question is how do I filter out messages that have already been sent to a user. According to the section on inequality filter in queries a != translates to two queries for greater than and lesser than and the results are then combined. Which needless to say does not work in the case of a list of Keys. Basically members_not_sent_message = Message.all().filter('sent_to_users !=', available_user).fetch(100) does not work.

Is there a way to find values not in a ListProperty, or do I have to go through each item and find messages which have not been sent? Or is there another design for a system like this that circumvents this GAE datastore limitation (if there is one in this case) ?

  • 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-26T11:25:25+00:00Added an answer on May 26, 2026 at 11:25 am

    Inequality filters on list properties don’t really work. As you know, inequality filters run separate “less than value” and “greater than value” queries under the hood, and then concatenate the results. List properties with multiple values will have multiple hits in the same index, so if you filter out one item you’ll always match another.

    Consider keeping two lists: besides the sent list, keep a not_sent list, and query that.

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

Sidebar

Related Questions

In our application we have a little query that looks like this: var selectedAgents
I have this easy little form in my JavaFX application. I want to use
I have this little application, and what it does is a user can add
I have a little application which uses regular expressions under VB6. It works perfectly
I have a quick little application and wanted to give a try to develop
Hi I have created a little application to move some files around and put
I have a little facebook iframe application written with rails and the facebooker plugin.
I'm working on a little test application at the minute and I have multiple
I'm new around here and i have a little problems with a C# application.
I have been making a little toy web application in C# along the lines

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.