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

Binding error on sub queries #686

Closed
dwedigital opened this issue May 26, 2022 · 0 comments · Fixed by #691
Closed

Binding error on sub queries #686

dwedigital opened this issue May 26, 2022 · 0 comments · Fixed by #691
Labels
bug An existing feature is not working as intended

Comments

@dwedigital
Copy link

Query:

def wagers(self):
    from app.models.Wager import Wager
 
    return Wager.where(
        lambda query: (
            query.where("challenger", self.email)
            .or_where("proposer", self.email)
            .or_where("referee", self.email)
        )
    ).get()

and the associated query exception:

Incorrect number of bindings supplied. The current statement uses 3, and there are 1 supplied.

Masonite-orm version: 2.11.9

@dwedigital dwedigital added the bug An existing feature is not working as intended label May 26, 2022
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