[Libreoffice-bugs] [Bug 112722] Issue on setting up Relationship

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Apr 16 15:38:33 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=112722

--- Comment #12 from robert at familiegrosskopf.de ---
(In reply to perie_gut from comment #11)
> Created attachment 141394 [details]
> trying to create a relationship to a table with 2 primary keys
> 
> Still cannot create a relationship to a table with 2 primary keys

Seems you are trying to create relationships between tables, which contain both
more than one primary-key. I have tried this through direct SQL:

1: Primary or unique constraint required on main table: "journal_lines" in
statement [ALTER TABLE "accountcode" ADD FOREIGN KEY ("accountcode") REFERENCES
"journal_lines" ("accountcode")]

2: Primary or unique constraint required on main table: "accountcode" in
statement [ALTER TABLE "journal_lines" ADD FOREIGN KEY ("accountcode")
REFERENCES "accountcode" ("accountcode")]

You need a unique-field if you want to create a relationship. Three of of the
tables doesn't have a unique-field. The have more than one primary key. HSQLDB
doesn't support this.

The only bug here is: The GUI doesn't recognize this relation isn't be allowed.
It paints a connection which doesn't show 1:1 or 1:n but this connection
couldn't be saved.

Which tables did you try to connect with which relation?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180416/447d9eef/attachment.html>


More information about the Libreoffice-bugs mailing list