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

Where_Raw follow by where #540

Closed
felipehertzer opened this issue Dec 15, 2021 · 1 comment · Fixed by #545
Closed

Where_Raw follow by where #540

felipehertzer opened this issue Dec 15, 2021 · 1 comment · Fixed by #545
Labels
bug An existing feature is not working as intended

Comments

@felipehertzer
Copy link
Contributor

Describe the bug
When I use the where_raw function and then the where/where_ir function.. it is adding the logical operation 'WHERE' twice in SQL.

To Reproduce

builder.where_raw("`age` = '18'").where("name", "=", "James").to_sql()
SELECT * FROM `users` WHERE `age` = '18' WHERE `users`.`name` = 'James'

Expected behavior

SELECT * FROM `users` WHERE `age` = '18' AND `users`.`name` = 'James'

Desktop (please complete the following information):

  • OS: Mac OSX

What database are you using?

  • Type: MySQL - MariaDB
  • Version 10.4
  • Masonite ORM v1.0.65
@felipehertzer felipehertzer added the bug An existing feature is not working as intended label Dec 15, 2021
@josephmancuso
Copy link
Member

josephmancuso commented Dec 15, 2021

Ah! This is an easy fix.

Need to add a missing loop_count += 1 on this line!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An existing feature is not working as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants