New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ambigous foreign key column reference #8289
Comments
Ok I figured out that a role column with integer type has been added to directus_roles so I deleted it and fixed the problem. |
I re-opened the issue because I believe this case should be taken into consideration by preventing the user from using a standard column name like "role" in this case. |
Thanks for the investigation! That helps alot to narrow down what happened. Upon investigation, seems like it's not really standard column name being the issue (as directus/api/src/middleware/authenticate.ts Lines 41 to 44 in 437e52a
Notice how line 42 just selects |
Preflight Checklist
Describe the Bug
I created different relation type fields (like O2M) in a single content type object and named the foreign key as "role" (I wanted to refer to the directus_roles table to have a list of roles in the object to be able to configure a workflow). Now I'm unable to access the app (white screen) and I get this error "column reference "role" is ambiguous".
I also deleted the single content type table and recreated it but couldn't get back the app to work.
To Reproduce
See above
What version of Directus are you using?
9.0.0-rc.93
What version of Node.js are you using?
14.16.1
What database are you using?
Postgresql 13
What browser are you using?
Chrome
What operating system are you using?
Windows
How are you deploying Directus?
Locally on Visual Code
The text was updated successfully, but these errors were encountered: