Hi Lukas,
Many thanks for the very detailed explanation J
I will have a proper read through to understand which option to choose and get back to you with my results!
Cheers
Dan
From: Lukas Knapek [mailto:bounce-LukasKnapek@toadworld.com]
Sent: 08 October 2014 14:39
To: tdm@toadworld.com
Subject: RE: [Toad Data Modeler - Discussion Forum] Changes In v5.3 Have Impacted Model To Database Generate Change Script Function
RE: Changes In v5.3 Have Impacted Model To Database Generate Change Script Function
Reply by Lukas Knapek
Hello Dan,
TDM 5.3 has a new system of creating indexes to foreign keys. There is a new option that, when enabled, creates these indexes automatically. It can be set either for each specific relationship or for entire model. Note that this option is enabled by default in 5.3.
Indexes created by this function have additional properties, they are linked to a relationship. Indexes you’ve created in older version of TDM have no such properties, they could be created manually only. That’s where the differences found in Model Compare come from.
Now, since you’ve created your model in older version of TDM, it uses the old system of FK indexes. And when you compare this model to a database (during change script generation), what TDM does is it actually reverse engineers the database to a model and compares the two models. The reverse engineered model uses the new system of FK indexes (since it is enabled by default) and that’s why you see those differences.
There are two ways to get rid of those differences.
1. Use the new system of FK indexes in your old model
This is done by opening your model in TDM 5.3, right-clicking on it in Model Explorer and selecting the Infer Indexes of Foreign Keys option. The function will link your FK indexes with your relationships. The advantage of this new system is that whenever you make changes to the relationship between your primary key and foreign key, the index will change accordingly.
2. Disable the new function in your new models
By unchecking the Index to Foreign Key in Child Entity option in Options | Physical Model, you will assure that new models will use the old system of FK indexes. This means that when you try to generate change script next time, there will be no more differences. On the other hand, you also lose the advantage of the new system.
You can choose any of the two systems depending on what works best for you.
Regards,
Lukas
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or Unsubscribe from Toad Data Modeler - General notifications altogether.
Toad Data Modeler - Discussion Forum
Flag this post as spam/abuse.