-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
feat(base_model): add findManyBy method #1010
Conversation
4689179
to
b14a0e7
Compare
b14a0e7
to
ea41f57
Compare
Looks fine to me. Let's open another PR for the docs as well and then we can merge it. |
Should be good! |
About the lint issue, Prettier formatted it like that when saving. Also, neither |
( fixed the lint issue with |
it's worth pointing out that while findByMany supports a clause, findBy only supports key/value, if its not a terrible ask it would be nice to update findBy as well so that it can also do clauses... this way it's more useful, as well as consistent :) |
Yes, as said in the last sentence, it is going to be added too! |
oh whoops my mistake, i dont know how i missed that, sorry! 😅 |
Hey there! 👋🏻
This PR adds a
findManyBy
method to the ORM.Since we already have helpful static methods for most use cases, we were missing one that could fetch multiple records with a condition.
The method
findManyBy
can be used in two ways:If this PR is accepted, I will create another one to add the object syntax override to the
findBy
method.