<@UESADRKMY> <@U785TRF34> can somebody please addr...
# orm-help
t
@Ryan @dpetrick can somebody please address this issue? There is a bug in generated inputs hierarchy and this is somewhat breaking stuff https://github.com/prisma/prisma/issues/9989
d
CreateMany doesn't allow you to nest more operations. You can only write scalars.
t
@dpetrick so this is intended behaviour? but this draws this input in many cases useless. why so and can this be changed?
d
This is intended. It can only be changed in some circumstances for some connectors - likely only Postgres, but the amount of work is disproportional to the gain for us at the moment. You can always choose to use nested
create
with a list input instead of
createMany
. Create many is only there because some developers choose to insert far too many nested records at once for create to handle (more akin to bulk inserts). It uses
INSERT .. INTO .. VALUES
whereas create single uses a single insert statement plus subsequent inserts for deeper nesting, but obviously making it far less efficient for many inserts at once.
✔️ 1
t
@dpetrick got it... not very convenient but thank you for explanation. I'm building an automated integration test system for prisma-based apps and this brings up a lot of edge cases like this 😞
a
@dpetrick that's a really helpful explanation of why nesting isn't supported