Closed gtolarc closed 3 years ago
https://github.com/paljs/prisma-tools/blob/master/packages/admin/src/types.ts#L59
I didn't know there was a useSet option in PrismaTable. There is no problem if useSet is set to false.
https://github.com/paljs/prisma-tools/blob/master/packages/admin/src/PrismaTable/Form/useActions.ts#L103 It is correct to use 'set' for basic update, but for relationfield, 'set' should not be used to avoid error. Therefore, it seems that the above part needs to be changed 'useSet=false'.
Thanks for solving this issue will come in the next release. Also, you are welcome to add pull request with your fixes at anytime
The following query error occurs in one-to-many relationship. It seems to be a bug. In the basic example, I tried the same test when adding a group to a user, and an same error occurs.
updateOneUser {where: {id: 1}, data: {group: {connect: {id: {set: 1}}}}}