Bug #45089 Table positions in EER diagrams are not saved
Submitted: 26 May 2009 7:55 Modified: 26 May 2009 8:47
Reporter: Joerg Schmitz-Linneweber Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:5.0.30 OSS OS:Windows
Assigned to: CPU Architecture:Any
Tags: EER diagram position persistent saved

[26 May 2009 7:55] Joerg Schmitz-Linneweber
Description:
It seems as if the (graphical) positions (x and y coordinates) of a table in a freshly created EER diagram are not saved in the mwb file.

After loading a previously edited mwb file, all tables are drawn in the upper left corner (0/0 ?). Even if they were moved onto other locations before saving.

How to repeat:
- Start WB
- File->New (event. save or abandon prior work)
- double-click "Add Diagram"
- In the new create EER d., select "Place a new table" from the Symbolbar on the left and place it somewhere on the sheet. Please don't place it in the upper left corner!
- Right-click on "table1" and select "Edit table". Select the Tab Columns and add some columns.
- From the menu select File->"Save as..." and give it the name "test". (The extension .mwb will be added automatically.)
- Close/Finish WB!
- (Re-)Start WB and select File->"Open..." select "test.mwb".
Now WB loads this model and displays our table "table1" in the upper left corner...
[26 May 2009 8:08] Joerg Schmitz-Linneweber
I just open the .mwb file (will include it in the next comment) and found, that the actual positions *are* saved in the data!

Short excerpt:
--- snip -------------------------------------
<value type="object" struct-name="workbench.physical.TableFigure" id="{D33E1C75-6D1D-4DEE-B334-131B6724F334}" struct-checksum="0x93701521">
                <link type="object" struct-name="db.mysql.Table" key="table">{886AB2EA-B50C-4962-87DE-231F6BF385BD}</link>
                <value type="int" key="columnsExpanded">1</value>
                <value type="int" key="indicesExpanded">0</value>
                <value type="int" key="foreignKeysExpanded">0</value>
                <value type="int" key="triggersExpanded">0</value>
                <value type="int" key="enabled">0</value>
                <value type="int" key="expanded">1</value>
                <value type="real" key="height">8.7e+001</value>
                <link type="object" struct-name="workbench.model.Layer" key="layer">{8DFCC2CD-F07D-4120-BC5C-B275583713FE}</link>
                <value type="real" key="left">2.37e+002</value>
                <value type="int" key="locked">0</value>
                <value type="real" key="top">2.19e+002</value>
                <value type="real" key="width">1.21e+002</value>
                <value type="int" key="manualSizing">0</value>
                <value type="string" key="color">#98BFDA</value>
                <link type="object" struct-name="workbench.physical.View" key="owner">{9B50BA44-2B31-4552-A3B3-38348D595AEE}</link>
                <value type="int" key="visible">1</value>
                <value type="string" key="name">table1</value>
              </value>
--- snap -------------------------------------

So, the values for "left", "top", "width" and "height" are there! (Albeit, they are "real" instead of "int" which I would've guessed. :-)

Hmm. Perhaps some should have a look into the reconstruction code ("de-serialisation"?) of the "load_mwb_file()" code...
[26 May 2009 8:08] Joerg Schmitz-Linneweber
The .mwb file mentioned in my comment above

Attachment: test.mwb (application/x-zip, text), 3.69 KiB.

[26 May 2009 8:47] Susanne Ebrecht
This is a duplicate of bug #43455