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

fix(querybuilder): Log a warning if where() is called again on a quer… #36261

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jan 20, 2023

…y builder object

Summary

  • Ref Fix WHERE condition when selecting user's availability for the status… #36260
  • Since this is not the first time we have a where-whereOr/whereAnd-where situation as a bug, I think it's time to add a safety net by logging a warning (or even an error?) when where() is being used on a query builder while the current where is not empty. But it reduces reusability of QueryBuilder objects (a pattern I dislike anyway 😅)

Checklist

…y builder object

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added this to the Nextcloud 26 milestone Jan 20, 2023
@nickvergessen nickvergessen self-assigned this Jan 20, 2023
@nickvergessen nickvergessen requested review from ArtificialOwl and removed request for a team January 20, 2023 06:45
@nickvergessen
Copy link
Member Author

nickvergessen commented Jan 20, 2023

Potential other cases:

@nickvergessen nickvergessen merged commit ecad09b into master Jan 23, 2023
@nickvergessen nickvergessen deleted the techdebt/noid/warn-devs-about-potential-bugs branch January 23, 2023 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants