-
Notifications
You must be signed in to change notification settings - Fork 106
Add WhereHas method #1251
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
base: master
Are you sure you want to change the base?
Add WhereHas method #1251
Conversation
hwbrzzl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR, thanks, LGTM basically. Could you test the WhereHas function before writing more code? You can add test cases in the this file.
|
@hwbrzzl fixed comments. Added some tests for whereHas method. But have an issue testing buildWhereRelation method. It uses getModelSchema function, which creates gormio.Statement instance. does it require db connection to detect schema relationships? Here is error stack I get Should I test it with Docker under https://github.com/goravel/framework/tree/master/tests folder? Or is there any other way to get model schema without connection? |
|
@zoryamba Thanks, and yes, the test cases can be added in the tests folder if they need a real db connection. |
π Description
Closes goravel/goravel#373
β Checks