Apache OpenOffice (AOO) Bugzilla – Issue 56898
Two separate relations for the same pair of tables impossible to define.
Last modified: 2008-02-18 03:29:47 UTC
It is not possible to define two separate 1-n relations for the same pair of tables, i.e. table2 has two separate foreign keys referring to table1. Example: A table "Family" (table2), that includes "FatherId" and "MotherId" attribute fields, both corresponding to entries in the "Individual" table (table1). I've tried different ways using the "Relation design" window. 1. By dragging the foreign key2 of table2 into the primary key of table1, the message "relation already exists" appears, indicating that a second relation is not expected to ever be needed, which is usually correct in practice, but in principle wrong, as the example above proves. 2. By pressing the "New relation" button. This way the relation can be defined and actually two separate lines connecting the two tables appear but the previously defined relation is not enforced any more and if the "Relation design" window is closed and opened again, only the one relation is indicated by the lines drawn. MS-Access does this properly, although not ideally, by allowing the introduction in the "Relation design" window, of the same table more than once with an alias.
I can confirm this behaviour on m139, on Linux If you try to add a second relation, you get the error message saying that it already exists and that you may edit it. However, you only get the choice of editing the first relation. The second relation never shows up. setting oooqa and platform to all alex
re-assign to oj. Ocke, I'm afraid as an outside qa, I have no visibility as to who is responsible for what in the Base module, so I apologize for shoving this onto you if it's not your area. alex
It's a problem in the ui. I created the second primary key by (copy out of the script file) and now the UI shows the correct relations. Best regards, Ocke
*** Issue 59052 has been marked as a duplicate of this issue. ***
I believe this should be marked as a duplicate of issue 57006, or vice versa if you prefer.
*** Issue 57006 has been marked as a duplicate of this issue. ***
I raise the target. :-)
Is nothing happening about this upstream? It seems to me to be a serious defect, and it's going to cost me a lot of work to evade.
Well, Ocke has just stated that he's flagged it for fixing in the 2.x branch, so that is already much better than the day before yesterday, when it was still only flagged as "Later", i.e. an indiscriminate time and place in the future ;-) Alex
Good news! Thanks Alex.
*** Issue 76591 has been marked as a duplicate of this issue. ***
*** Issue 78295 has been marked as a duplicate of this issue. ***
Fixed in cws dba24b
*** Issue 74071 has been marked as a duplicate of this issue. ***
Is issue 74071 truly a duplicate of this issue? 74071 refers to the fact that the Design GUI doesn't automatically include table aliases in the SQL string when you have multiple instances of the same table in a query. This one refers to having multiple 1:N relationships between the same table. My concern is that OOo 2.2.1 SQL query design GUI doesn't include table aliases in the FROM clause of the generated SQL statements. Worse, if you generate the aliases in the SQL string directly and then switch back to GUI design view, it completely removes the duplicate table entry and its alias. I see that the table issue has been resolved, but now the query issue has been folded into this ticket and has been marked as fixed -- even though there's no sign of any fixing activity here or in the 'duplicate' ticket.
Every duplicate task should also be tested and verified when QA tests this issue. What do you mean with -- even though there's no sign of any fixing activity here or in the 'duplicate' ticket. ?
Please verify. Thanks.
verified in CWS dba24b find more information about this CWS, like when it is available in the master builds, in EIS, the Environment Information System: http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fdba24b
change target to 2.4 because issue will be fixed in OpenOffice.org 2.4
Tested w/ OOH680_m7 x85_64, Kubuntu 7.1 x86_64 Closing Opening related Issue #: 86168