Open juri-diener opened 6 months ago
Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂
Hi @juri-diener, My apologies for the delayed response. Could you provide more details on the relationships between 'user' and 'org'? Can a 'user' be associated with multiple 'orgs'?
Hi @juri-diener, I can reproduce the issue by following the details in the description. Hence, marking this as a bug for the team to evaluate further.
Hi @juri-diener, I can reproduce the issue by following the details in the description. Hence, marking this as a bug for the team to evaluate further.
Hi, ok that's good any update on this?
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
20.6.1
Amplify CLI Version
11.0.5
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
So if I have this models with the relation ships. It creates for the createUserInput following:
This is related both to the
myOrg:Org @hasOne
relation. If I remove the entire line, then both userMyOrgId and userMyOrgUserID are gone.As well for the between model which are created automatically has the same issue.
And I different problem: So when I add an item in OrgUser. Provide the orgId, orguserID with the orgId and the userId with the userId. And then query the user I got null.
If I remove the hasOne relation then it works. But this is a common pattern. That a user as one org because he is the owner and user can be part of multiple orgs and org can have multiple user.
Expected behavior
For createUserInput:
For CreateOrgUserInput:
Reproduction steps
Create the model and push it with amplify push -y
Project Identifier
No response
Log output
Additional information
No response
Before submitting, please confirm: