Can relational data be created on createMany? if n...
# orm-help
j
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
Hi @Jijin P ๐Ÿ‘‹, You can create relational data with
createMany
. Look at this section of the documentation to find relevant examples.
๐Ÿ‘ 1
g
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