Description:
The "Synchronize Model" function fails to migrate one of two created many-to-many tables, between the same two parent tables, when those tables are created at the same time.
How to repeat:
Create two parent tables - in my case "project" and "person".
Synchronize the model (or forward engineer) to create the two parent tables.
Use the n:m tool to create two many-to-many link-tables between "project" and "person" - in my case, I name these tables "quality_reviewer" and "safety_reviewer".
Now synchronize the model to create the link-tables - the "model and database differences" screen will show the SQL for only one of the link-tables; the other one will show up empty, as though no changes had been made, even though neither of these tables exist yet.
Click on "table mapping" and inspect the two link-tables - both of them show "original target table" as "project_person", which is incorrect, and is most likely the source of this problem.
Suggested fix:
As far as I can figure, there is no "original target table", since these tables have never been deployed yet - MWB seems to assume that whatever the original table-name that was generated by the n:m tool is also the table it was originally targeting, but I don't think this assumption can be made before the table is actually deployed (either by synchronizing the model or forward engineering it) for the first time?
Not sure if this is the right approach to fixing this problem.
Workaround:
Deploy the tables by forward engineering only those two tables - this will cause the "original target table" to correctly set itself, and model synchronization will work normally for those tables afterwards.