MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
165 stars 48 forks source link

Binding error on sub queries #686

Closed dwedigital closed 2 years ago

dwedigital commented 2 years ago

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