Join Slack
Powered by
Can relational data be created on createMany? if n...
# orm-help
j
Jijin P
08/24/2022, 9:27 AM
Can relational data be created on createMany? if not whatโs the best way to do this. Any alternative to looping and inserting?
โ 2
r
Raphael Etim
08/24/2022, 9:37 AM
Hi
@Jijin P
๐, You can create relational data with
createMany
. Look at this
section
of the documentation to find relevant examples.
๐ 1
g
Gustavo
08/24/2022, 9:37 AM
there's a feature request for this, but it's not possible as of today... just loop and insert inside a
this.prisma.$transaction
if you need a all or fail
๐ 1
3
Views
Open in Slack
Previous
Next