0.6.1
Got a small release here with some improvements to create_many
and a change to how types are exported when using rspc.
create_many
only accepts scalar fields
When implementing create_many
I made the mistake of using the same argument structure of create
and put it in a Vec
.
This is not correct as create_many
does not permit using relation fields with connect
, instead it only allows setting scalar fields of the model. Models' create
utility and create_many
have been changed to reflect this fix.
This is a breaking change, but any create_many
involving a relation would always result in an error, so I don't feel a new minor version is warranted.
create_many
has skip_duplicates
function
Prisma Client JS has a skipDuplicates option, which was not implemented in 0.6.0. Now it is possible to call skip_duplicates
after create_many
, providing the same functionality as the JS option.
Model types in rspc bindings do not include relations
Previously, model types exported via rspc exactly mirrored model Data
structs, containing all scalar fields as well as optional relation fields.
After integrating this and replacing uses of with/fetch
with include
in Spacedrive, I have decided to encourage utilising the extra type safety provided by include
and removed all relation fields from model types, so that they only contain a model's scalar fields.
More information can be found in the docs.