Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bool query not working... #282

Closed
LilMoke opened this issue Nov 16, 2021 · 5 comments
Closed

Bool query not working... #282

LilMoke opened this issue Nov 16, 2021 · 5 comments
Labels
type:question Support or code-level question

Comments

@LilMoke
Copy link

LilMoke commented Nov 16, 2021

New Issue Checklist

Issue Description

I can do this: Word.query(WordKey.word == “Some Text”) and it works (string compare)
I can so this: Word.query(WordKey.wordOrder < 8) and it works (int)
But this does not: Word.query(WordKey.isWordNeeded == true) Bool fields do not seem to work, it always return a 0 result set

Is there something special with a bool that I am missing?

Could this be related to this issue: #49

Steps to reproduce

Create a query as follows:
@ObservedObject var wordsWordViewModel = Word.query(WordKey.isWordNeeded == true)
.order([.descending("word")])
.viewModel

Actual Outcome

0 records are return even though several exist with the a bool value of true

Expected Outcome

several records to be returned in the result set

Environment

Heroku Server

Client

  • Parse Swift SDK version: 2.2.5
  • Xcode version: 13.1
  • Operating system (iOS, macOS, watchOS, etc.): iOS
  • Operating system version: mac OS Monterey 12.0.1

Server

  • Parse Server version: 4.10.1
  • Operating system: Ubuntu 18.04
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Heroku

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version:
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): MongoDB

Logs

@parse-github-assistant
Copy link

parse-github-assistant bot commented Nov 16, 2021

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@cbaker6
Copy link
Contributor

cbaker6 commented Nov 16, 2021

Can you fill out the whole template?

@LilMoke
Copy link
Author

LilMoke commented Nov 16, 2021

ok, updated

@cbaker6 cbaker6 added the type:question Support or code-level question label Nov 16, 2021
@cbaker6
Copy link
Contributor

cbaker6 commented Nov 16, 2021

There seems to not be a problem with this from my testing and probably something wrong with how you are saving your objects. See response here: https://community.parseplatform.org/t/parseswift-query-question/2180/9?u=cbaker6

@cbaker6
Copy link
Contributor

cbaker6 commented Nov 17, 2021

@cbaker6 cbaker6 closed this as completed Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

2 participants