<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Issue on setting up Relationship"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=112722#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Issue on setting up Relationship"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=112722">bug 112722</a>
from <span class="vcard"><a class="email" href="mailto:robert@familiegrosskopf.de" title="robert@familiegrosskopf.de">robert@familiegrosskopf.de</a>
</span></b>
<pre>(In reply to perie_gut from <a href="show_bug.cgi?id=112722#c11">comment #11</a>)
<span class="quote">> Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=141394" name="attach_141394" title="trying to create a relationship to a table with 2 primary keys">attachment 141394</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=141394&action=edit" title="trying to create a relationship to a table with 2 primary keys">[details]</a></span>
> trying to create a relationship to a table with 2 primary keys
>
> Still cannot create a relationship to a table with 2 primary keys</span >
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?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>