I started a data model and implemented it back in version 3 of SDDM somewhere, then had to put it down for about 9 months and pick it back up. When I picked it back up, 4.0 RC3 was out, so I used that to work on the old model. Certain problems appeared, and the one that is currently most frustrating is when I use the "Synchronize Data Dictionary" feature to create DDL to modify the physical table according to model changes I made.
I used to be able to simply right click on the table, choose Synchronize Data Dictionary, and then only the changes I made would be generated. Now, however, the compare feature seems to not be able to detect certain properties of the physical implemented table it is comparing to. For instance, there's a table with 3 FK's, and the compare only detects one of them, so it attempts to create the other two from scratch. This of course fails because the FK's actually exist. I haven't tried dropping and re-creating the keys in the DB because I don't want to go to that effort for each table.
I can post screenshots if you'd like that illustrate the problem. Does anyone have some advice? It seems like this is a bug in the software. Thanks.
In the Early Adopter 3 version of Data Modeler 4.0 there was a problem with Foreign Keys that had initially been created using version 3 of Data Modeler.
This problem has been fixed in the production version 220.127.116.113, which can now be downloaded from OTN.
I believe this should fix your problem. It would be preferable to start using this with your original version 3 model rather than a model you have saved using 4.0 EA3.
Thanks for the reply, but it doesn't appear that this fixes the issue. I just opened a model that I built using version 3 and haven't saved in any other version (I'm not sure exactly which build of 3) in 18.104.22.1683, and it's still not recognizing the FK's properly in the target comparison DB. I'd be happy to provide any troubleshooting details if it would help.
At this point I'm thinking it may be easiest just to roll back and use the 3-something version that created the model in the first place, but as I said earlier I'm not sure what version that is. Do you know of a way to identify which version of SDDM created a model?
I created a little album on imgur to show the problem in more detail. I can also provide logs if those would be useful, or screenshots of what happens if I open the same model in previous versions of SDDM. The link to the album of images is below, where you can see that the implemented model in the DB contains the two foreign keys on the table in question, but SDDM doesn't detect that and wants to make new FK's. I should re-iterate that this problem happens, either for FK's or sometimes for indexes or even PK's on almost every table in the model.
Thanks for the help,
thanks for reporting the problem. I logged a bug for that.
Synchronization works without that problem if all involved tables are included in sync operation. The problem is caused by PK/UK constraints with system generated names.
You can invoke synchronization on selection of objects (one or more), on subview or the whole model. You can use "Select neighbors" in order to get related objects selected or
"Create subview with neighbors" available in context menu for table in the browser.
Thanks, I can confirm that when I select the neighbors to the table and include them in the sync then the FK problem is fixed. However, it looks like the sync still didn't detect the PK index that exists (it attempts to re-create it). Is that related to the same problem? Here's a screenshot that illustrates the problem: http://imgur.com/7Xu6SpO. Both tables that are linked via FK to the table in question were included in the sync operation. Just thought you may wish to include this in the bug report as well.
Thanks again for the help!