Bug #99555 Unable to create constraint when reference table has a generated column
Submitted: 13 May 2020 18:15 Modified: 12 Jun 2020 9:50
Reporter: Alexandros Bantzos Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:8.0.20 OS:Windows (Microsoft Windows 10 Home)
Assigned to: CPU Architecture:Any
Tags: WBBugReporter

[13 May 2020 18:15] Alexandros Bantzos
Description:
I have a table users, where is a column that auto-generates the value from 2 other columns [... GENERATED ALWAYS AS(CONCAT(`col1`,`col2`))]

If I then go to another table and create a foreign key constraint to the users table, the "Reference column" field, wont show any columns from that table.

How to repeat:
create a table with a "generated" column
create another table and create a column with constraint to the first table.
The columns from the first table wont appear.
[12 Jun 2020 9:50] MySQL Verification Team
Hello Alexandros Bantzos,

Thank you for the bug report.
Imho this is duplicate of Bug #90350, please see Bug #90350.

Regards,
Ashwini Patil