• In the creation file, ACS generates an alter table instruction that adds foreign keys to the table. Foreign keys are generated from the Foreign Columns that are created for Relationships in Modeler.
• In the drop file, ACS generates an alter table instruction that removes the foreign keys from the table.
The One to One, Parent Optional and Cascade properties of the Relationship are ignored.
Table1 and Table2 have a relationship through Relationship1. Because of Relationship1, Modeler creates the *Column1foreign key in Table1 to reference the Table2Column1prime key.
If you generate Table1 using the SQL Server 2012ACS Code Generator DLL, the creation file contains the following text.
ALTER TABLE Package1Table1 ADD CONSTRAINT Relationship1_Column1 FOREIGN KEY(Column1) REFERENCES Package1Table2(Column1);
If you generate Table1 using the SQL Server 2012ACS Code Generator DLL, the drop file includes the following text.
ALTER TABLE Package1 Table1 DROP CONSTRAINT Relationship1_Column1;