Bug 45257

Summary: EDITING postgreSQL-SDBC Relation designer does not pick up all existing relationships
Product: LibreOffice Reporter: Drew Jensen <drew>
Component: DatabaseAssignee: Lionel Elie Mamane <lionel>
Status: NEW --- QA Contact:
Severity: major    
Priority: medium CC: iplaw67, lionel, mustelator, prlw1, sasha.libreoffice
Version: 3.5.0 RC2   
Hardware: x86-64 (AMD64)   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Drew Jensen 2012-01-25 23:54:30 UTC
Tested w/ Ubuntu 11.04, Lbo 3.5 RC2, Postgresql 8.4

Open an ODB connected to a postgresql database with muliple relationship constraints.

Open the relation design window.

Not all relationships will be displayed - in testing this was true 100% of the time the first time that window is opened. But if you do anything to that makes LibO think the window contents should be saved (even if you just trick it) and do so, then close the window and reopen it, most of the time (sorry it is not all the time) it then picks up the other relationships.

This seems to be limited to the relation design window as the Query designer and/or wizard and form wizard pick up all of the relationships right fro the start.
Comment 1 sasha.libreoffice 2012-05-11 03:02:01 UTC
Thanks for bugreport
Please, attach small database with which this bug reproducible. Or add link where it can be downloaded. May be test databases for Postgresql exists, tell if so.

Also attach odb file that demonstrates this problem.
Comment 2 Alex Thurgood 2012-07-23 08:05:15 UTC
Drew,

I can confirm similar behaviour with regard to the native mysql connector extension and a mysql server.

The problem appears to indeed lie with the Relationship designer tool/dialog.

In my own case :

- dragging and dropping to create a relationship between two tables appears to work, but only once between any two tables - in reality, the relationship is not created, the graphical UI representation always default to the first entry in the first table's field list, and if you click on the link to edit the relationship displays only one half, as it turns out the second table to which the link was made without referencing any field from the first table !!!

- trying to manually create a relationship by clicking on the Define button allows one to choose the fields from the tables to be linked, but when validated, fails to do this correctly, i.e. we get a repeat of the scenario above, whereby only the first field of one table appears, and this link only includes one field from one table, and not even the one that was defined by the user !!!

The whole relationship design tool/dialog seems broken, at least for external db's, I haven't tried with hsqldb internal.



Alex
Comment 3 Alex Thurgood 2012-07-23 10:48:10 UTC
Confirming as reproducible on LibreOffice 3.5.5.3 Mac OSX 10.7.4.

Test database : XTuple (http://www.xtuple.com/free-demo-of-xtuple-erp)

Using the built-in connector, when I call Tools > Relationships, the window opens but does not bring up any of the predefined relationships in the database. I get a Table list window, asking me to add the tables to define the relationships I want.


Compare the above behaviour to the same database, using a postgres JDBC connector:
- the relationships are displayed, in fact, so many of them that they overlap each other within the window (but that is not a new problem as such, it has always been that way, independent of the underlying database).

Conclusion : it works in with JDBC and not with sdbc-postgres.


Alex
Comment 4 Toni Ballesta 2013-08-18 09:06:07 UTC
Confirmed on NEWER 4.1.0.4. The problem is the same. Sometimes the relationships are correctly, sometimes not. I've over 30 tables with Postgresql. Opening, closing, reopening... and some relationships appear and disappear. No changes from the psql console: the CONSTRAINT values is not altered.
Comment 5 Alex Thurgood 2015-01-03 17:39:04 UTC
Adding self to CC if not already on

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.