Bug 88033 - EDITING: Only one relation between two tables is displayed even when there are more than one
Summary: EDITING: Only one relation between two tables is displayed even when there ar...
Status: RESOLVED DUPLICATE of bug 45257
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.3.5.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-05 00:28 UTC by James B. Byrne
Modified: 2021-01-08 19:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
LOBASE: simple base file showing n relationships from one tbl to multiple fields in another (5.21 KB, application/vnd.sun.xml.base)
2015-01-05 21:31 UTC, James B. Byrne
Details
screenshot showing multiple relations from one table to another (84.04 KB, image/png)
2015-01-05 21:33 UTC, James B. Byrne
Details
screenshot of same relations ship display after saving and reopening (81.38 KB, image/png)
2015-01-05 21:34 UTC, James B. Byrne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James B. Byrne 2015-01-05 00:28:59 UTC
In the relationship design view:

If a table T1 with a primary key t1_id is related to a table T2 with columns first_id, second_id, third_id;  And three relationships are created T1.t1_id 1:n T2.first_id, T1.t1_id 1:n T2.second_id, T1.t1_id 1:n T2.third_id; Then only one of these relationships is displayed in subsequent edits.  However, the relationships are known to exist because an error condition is raised if one attempts to add them again.
Comment 1 Alex Thurgood 2015-01-05 10:22:54 UTC
@James : please provide test odb file so that we can try and reproduce the behaviour, then reset to unconfirmed.

setting to needinfo pending requested information.
Comment 2 James B. Byrne 2015-01-05 21:31:13 UTC
Created attachment 111789 [details]
LOBASE: simple base file showing n relationships from one tbl to multiple fields in another

This bug appears to be a different issue than I first imagined.  The problem is not that additional relationships between the same two tables are not shown.  The problem is that the additional relationships are not saved at all.
Comment 3 James B. Byrne 2015-01-05 21:33:37 UTC
Created attachment 111790 [details]
screenshot showing multiple relations from one table to another
Comment 4 James B. Byrne 2015-01-05 21:34:34 UTC
Created attachment 111791 [details]
screenshot of same relations ship display after saving and reopening
Comment 5 Alex Thurgood 2015-02-04 17:10:51 UTC
@James : if I go to the menu Tools > Relationships and try and create a new relationship by dragging and dropping from the first table id to the non-displayed FK id fields, I get an error message that the FK ref already exists, and asked whether I want to create a new one or edit the existing ref.

Is this also what you see ?

I can confirm that in the ODB file you provided the relations are not drawn in the relations window, yet they appear to be defined in the ODB file itself.
Comment 6 Alex Thurgood 2015-02-04 17:11:34 UTC
Confirming on master

Version: 4.5.0.0.alpha0+
Build ID: 6143a7eeabea394133c54e97e3690bdf40b98247
Locale: fr_
Comment 7 Alex Thurgood 2015-02-04 17:16:17 UTC

*** This bug has been marked as a duplicate of bug 45257 ***
Comment 8 Julien Nabet 2017-04-18 14:20:00 UTC
Reading https://forum.openoffice.org/en/forum/viewtopic.php?t=67839, I gave a try.
When creating first relation, you can see cardinality ("1-n") but for the other ones created next, you don't see cartidinality.

You must explicitely name the constraints (only possible via SQL command in LO except)