Aurelius v5.3
I have a class Tfrmlines that includes:
[Association([TAssociationProp.Required], CascadeTypeAll - [TCascadeType.Remove])]
[JoinColumn('afmid', [TColumnProp.Required], 'afmid')]
[JoinColumn('btid', [TColumnProp.Required], 'btid')]
[JoinColumn('aa', [TColumnProp.Required], 'aa')]
Ffrm: Tfrm;
During database update I am getting the following error:
EMySQLNativeException [FireDAC][Phys][MySQL] Can't create table pchr
.#sql-19bc_48
(errno: 121 "Duplicate key on write or update")
The produced sql that causes the trouble during the database update is:
ALTER TABLE myformlines ADD CONSTRAINT
FK_myformlines_myform_afmid_btid_aa FOREIGN KEY (afmid, btid, aa) REFERENCES myform (afmid, btid, aa)
I think that something like "ON UPDATE RESTRICT ON DELETE RESTRICT;" is missing, because adding it to the above sql statements it works