Issue 56898 - Two separate relations for the same pair of tables impossible to define.
Summary: Two separate relations for the same pair of tables impossible to define.
Status: CLOSED FIXED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.0
Hardware: PC All
: P3 Trivial with 2 votes (vote)
Target Milestone: OOo 2.4
Assignee: marc.neumann
QA Contact: issues@dba
URL:
Keywords: oooqa
: 57006 59052 74071 76591 78295 (view as issue list)
Depends on:
Blocks:
 
Reported: 2005-10-28 21:38 UTC by emmonos
Modified: 2008-02-18 03:29 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description emmonos 2005-10-28 21:38:48 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.
Comment 1 alex.thurgood 2005-11-29 11:50:15 UTC
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
Comment 2 alex.thurgood 2005-11-29 11:52:48 UTC
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
Comment 3 ocke.janssen 2005-11-29 14:21:53 UTC
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
Comment 4 Frank Schönheit 2005-12-08 07:09:53 UTC
*** Issue 59052 has been marked as a duplicate of this issue. ***
Comment 5 drewjensen.inbox 2005-12-12 16:23:05 UTC
I believe this should be marked as a duplicate of issue 57006, or vice versa if
you prefer.
Comment 6 alex.thurgood 2005-12-12 17:27:14 UTC
*** Issue 57006 has been marked as a duplicate of this issue. ***
Comment 7 ocke.janssen 2006-09-06 07:34:14 UTC
I raise the target. :-)
Comment 8 prhumphrey 2006-09-06 17:25:08 UTC
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.
Comment 9 alex.thurgood 2006-09-06 18:15:03 UTC
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
Comment 10 prhumphrey 2006-09-07 10:20:46 UTC
Good news! Thanks Alex.
Comment 11 Regina Henschel 2007-04-22 20:36:16 UTC
*** Issue 76591 has been marked as a duplicate of this issue. ***
Comment 12 Frank Schönheit 2007-06-11 12:13:22 UTC
*** Issue 78295 has been marked as a duplicate of this issue. ***
Comment 13 ocke.janssen 2007-08-16 10:58:53 UTC
Fixed in cws dba24b
Comment 14 ocke.janssen 2007-08-28 13:00:13 UTC
*** Issue 74071 has been marked as a duplicate of this issue. ***
Comment 15 smoke3723 2007-09-23 01:41:19 UTC
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.
Comment 16 ocke.janssen 2007-09-24 06:54:21 UTC
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.

?
Comment 17 ocke.janssen 2007-10-02 10:14:42 UTC
Please verify. Thanks.
Comment 18 marc.neumann 2007-10-16 10:13:47 UTC
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
Comment 19 marc.neumann 2007-10-16 10:38:29 UTC
change target to 2.4 because issue will be fixed in OpenOffice.org 2.4
Comment 20 marc.neumann 2007-10-16 10:40:02 UTC
change target to 2.4 because issue will be fixed in OpenOffice.org 2.4
Comment 21 drewjensen.inbox 2008-02-18 03:29:47 UTC
Tested w/ OOH680_m7 x85_64, Kubuntu 7.1 x86_64

Closing

Opening related Issue #: 86168