Issue with foreign key for mysql export

I found an issue with the mysql export.
I have following table definitions:

Table father {
obj_id char(50) [primary key, unique]
}

Table child {
obj_id char(50) [primary key, unique]
father_obj_id char(50) [ref: - father.obj_id]
}

So the child table has a foreign key to the father. The export to SQL looks like this:

CREATE TABLE father (
obj_id char(50) UNIQUE PRIMARY KEY
);

CREATE TABLE child (
obj_id char(50) UNIQUE PRIMARY KEY,
father_obj_id char(50)
);

ALTER TABLE father ADD FOREIGN KEY (obj_id) REFERENCES child (father_obj_id);

…so its trying to create a foreign index in the father table which is wrong. The child table should be altered.
Please immediately fix the issue. Previously it added the index correctly in the child when exporting to mysql. I think it appeared after changing to the new parser

Thank you for reporting the issue.

We’ve acknowledged the issue and will fix it ASAP.

Since this problem only affects references that are defined inside column settings, you can temporarily fix it by defining references in a different form, such as this:
ref: father.obj_id - child.father_obj_id

Thanks.

Hi @janpomplun,

We just released an update that should fix the problem. Please check it out and let us know if you still have any issues.

Cheers.