We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This works at v2.17.2, but fails at v2.18.1.
Steps to reproduce the behavior:
class Contract(Model): ... @belongs_to def company(self): return models.Company
class Company(Model): ... @has_many('id', 'company_id') def contract(self): return models.Contract @scope def active(self, query): return query.where("status", 1)
Error Message:
Desktop (please complete the following information):
Versions:
The text was updated successfully, but these errors were encountered:
models.Contract.with_({"company": models.Company.active()})
This is not the proper usage of this feature. You have to use a lambda expression that takes a query builder instance.
I believe you should be able to do something like:
models.Contract.with_({"company": lambda q: q.active()})
Sorry, something went wrong.
Please see docs here https://orm.masoniteproject.com/models#dynamic-relationships
Thank you for the information, we will check how to fix the legacy code here.
No branches or pull requests
This works at v2.17.2, but fails at v2.18.1.
Steps to reproduce the behavior:
Error Message:
Desktop (please complete the following information):
Versions:
The text was updated successfully, but these errors were encountered: