Closed RomainLanz closed 8 months ago
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 npm run lint -- --fix
or npm run format
changed the format again. So probably a CI issue.
( fixed the lint issue with npm run lint -- --fix
. probably an issue with your setup 👮 )
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.