P
Prisma6mo ago
Arnór

Ordering of createMany items

When you use the create method and include a createMany, does Prisma guarantee the ordering of the items created? Or can they get created out of order? Eg. given the following:
prismaClient.opinion({
name: 'something',
favorite_fruit: {
createMany: {
data: [{ name: 'tomato' }, { name: 'orange' }]
}
}
})
prismaClient.opinion({
name: 'something',
favorite_fruit: {
createMany: {
data: [{ name: 'tomato' }, { name: 'orange' }]
}
}
})
in the above example, is the 'tomato' entry guaranteed to be created before the 'orange', or are they created potentially out of order?
2 Replies
Arnór
ArnórOP6mo ago
looks like @kapa.ai was able to answer my question
Nurul
Nurul6mo ago
Nice! I am glad to hear that!
Want results from more Discord servers?
Add your server