You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RelationFieldNotFound on nested create/connect #218
I get a "RelationFieldNotFound" when trying to do a nested create/connect.
The strange thing is that the error says it couldn't found the relation field for "user" on model "Question". But there isn't supposed to be one and I'm not trying to create one.
constuser=awaitphoton.users.create({data: {name: 'The User'}})constnode=awaitphoton.questions.create({data: {title: 'The Question',answer: {create: {content: 'The Answer',user: {connect: {id: user.id}}}}}})console.log({ node })
Console
DomainError(RelationFieldNotFound { name: "user", model: "Question" })
at PhotonFetcher.<anonymous> (/Users/errorname/Documents/Vrac/hello-prisma2/nested-create/node_modules/@generated/photon/index.js:34:23)
at Generator.throw (<anonymous>)
at rejected (/Users/errorname/Documents/Vrac/hello-prisma2/nested-create/node_modules/@generated/photon/index.js:5:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:49200) UnhandledPromiseRejectionWarning: Error: Error in Photon:
DomainError(RelationFieldNotFound { name: "user", model: "Question" })
at PhotonFetcher.<anonymous> (/Users/divyendusingh/Documents/prisma/p2-218/node_modules/@generated/photon/index.js:35:23)
at Generator.throw (<anonymous>)
at rejected (/Users/divyendusingh/Documents/prisma/p2-218/node_modules/@generated/photon/index.js:5:65)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:49200) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:49200) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I don't think that these are related issues, but @pantharshit00 would post the error message from the issue issue shortly and we can confirm the hypothesis.
Activity
[-]RelationFieldNotFound on nested create[/-][+]RelationFieldNotFound on nested create/connect[/+]Errorname commentedon Jul 23, 2019
It looks like a duplicate of prisma/prisma-client-js#33
timsuchanek commentedon Aug 5, 2019
@divyenduz please check if the issues are indeed related.
divyenduz commentedon Aug 5, 2019
I am able to reproduce this: https://github.com/divyenduz/p2_218
The following error is observed:
divyenduz commentedon Aug 5, 2019
I don't think that these are related issues, but @pantharshit00 would post the error message from the issue issue shortly and we can confirm the hypothesis.
mavilein commentedon Aug 8, 2019
This is fixed in binary version
b8957df02bca6708b7aefa56832eda409dbb1114which is available onalpha.Rekey the ORM CLI family to the unified CLI mount paths (#30102)