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: NEW
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: 2024-10-11 15:15 UTC (History)
5 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)
Comment 9 Robert Großkopf 2024-10-10 15:29:09 UTC
This bug isn't a duplicate of bug 45257, because the bug appears with internal HSQLDB. Bug 45257 is a special bug of PostgreSQL connected with direct connection to Base.
Comment 10 Julien Nabet 2024-10-11 11:55:30 UTC
Just wonder how you created the multiple 1..n relations to obtain screenshot 1.

I mean if I removed completely tbl_new_bugs save the file, close it and reopen it and try to put these relations again, I can't.
I only can put 1..n but not add the other ones, it complains about FK ref already exists (like in comment 5).
Comment 11 James B. Byrne 2024-10-11 15:13:58 UTC
First of all, that happened a long time ago and any memory of the steps I took is absent.

I believe that I was working with a new DB instance on the first screenshot and only saved the relations, closed the DB, re-opened the DB and entered the relations tool to obtain the second screenshot. 

I do not recall attempting to re-add the missing relations as my concern respected their absence from the display.  I did not bother to go any further so I never ran into the error that a non-displaying relationship actually existed in the DB.
Comment 12 James B. Byrne 2024-10-11 15:15:29 UTC
I should have read my original report more closely.  I did in fact run into the error that the relationships existed in the DB regardless of the fact that they did not display on the diagram.