Downside of using drizzle instance? #13624
AssisrMatheus
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been having some trouble getting my head around the local api
payload.create
andpayload.find
due to the lack of allowing me to create multiple records at once, or then having a more type-safe+autocompletion with with thewhere
field and nested properties, and then I saw that adrizzle
instance is available to use.I also see that payload automatically created a bunch of
relation_
extra tables. And of course there's the access control, hooks and the extra batteries. that we declare when creating collections.I'm guessing that by using the drizzle instance directly, we are opting out of all those batteries-included hooks, access control, validations, and more scarily for me, WE would the ones that have to insert into the
relation_
tables ourselves, or does it still handle that?I hope that we aren't opting out of anything because it would be nice to have it all of course, but I get if that's the case, just am confused whether it IS or not, since there are no mentions of it and what are the differences on the documentation.
Because if so, why does payload even have its own
payload.create
andpayload.find
methods? Compared to using the drizzle instance?Beta Was this translation helpful? Give feedback.
All reactions