P
Prisma•4mo ago
DH

When using createManyAndReturn, am I guaranteed the results order to be the same as of the input?

When using createManyAndReturn, am I guaranteed the results order to be the same as of the input?
3 Replies
Nurul
Nurul•4mo ago
Hey 👋 no, because databases do not explicitly guarantee that themselves. The order of the returned data from createManyAndReturn() is not guaranteed to match the order of the input data. You would need to use orderBy to get a guaranteed order
DH
DHOP•4mo ago
ok, thanks!
Nurul
Nurul•4mo ago
No worries! 🙂

Did you find this page helpful?