-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
bug: Firestore compositeFilter 'and' is not working #554
Comments
Note: Year and Month Fields are strings in Firestore collection documents |
I just tested this on Android and i can not reproduce the issue. Make sure that |
This issue has been labeled as Please provide a Minimal, Reproducible Example using this template in a public GitHub repository so we can debug the issue. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for us to reproduce the issue. |
monthly.page.ts
monthly.page.html
|
create at least 3 documents inside entries which have Fields with same Month:"02" and Year: "2024" |
Unfortunately, my time is limited and I can only work on issues that are sufficiently prepared. As described above, please provide a Minimal, Reproducible Example using this template in a public GitHub repository so we can debug the issue. Just add two buttons to this minimal, reproducible example:
|
Here is the repo
|
@aliexalter Please provide a public repository. Maybe someone else will have a similar problem in the future and take a look at this conversation and the code. |
@robingenz its public now sorry for inconvenience |
Have you try changing the Year value in composite query? it should not return 2025 or 2023 result it will be empty. But still return the results. |
Check the log when changing year by tapping prev and next buttons |
Thank you for pointing that out. I've just created a fix: #562 |
Plugin(s)
Version
5.4.0
Platform(s)
Current behavior
When I change this.currentDate by adding year it returns same result for example
this.currentDate Year == 2024, Month == 02 return the 2 results suppose A,B
When I change to
this.currentDate Year == 2023, Month == 02 it still return results A,B where as there is no record which has year 2023
Expected behavior
It should return empty [] snapshot which it can return when only Month is changed
Reproduction
Make a collection in Firebase Firestore with two fields and then query using compositeFilter
Steps to reproduce
Make a collection in Firebase Firestore with two fields and then query using compositeFilter.
Other information
No response
Capacitor doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 5.7.0
@capacitor/core: 5.7.0
@capacitor/android: 5.7.0
@capacitor/ios: 5.7.0
Installed Dependencies:
@capacitor/cli: 6.0.0-rc.0
@capacitor/core: 6.0.0-rc.0
@capacitor/android: 6.0.0-rc.0
@capacitor/ios: 6.0.0-rc.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Before submitting
The text was updated successfully, but these errors were encountered: