https://bugs.freedesktop.org/show_bug.cgi?id=82905

          Priority: medium
            Bug ID: 82905
          Assignee: [email protected]
           Summary: EDITING: Foreign Key between two subforms do not work
                    anymore
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: [email protected]
          Hardware: x86-64 (AMD64)
            Status: UNCONFIRMED
           Version: 4.3.0.4 release
         Component: Database
           Product: LibreOffice

Problem description: 
I have a form with two subforms (a table for 'file', only showing entries with
'file'.'movie_id" matching 'movie'.'id' and a table 'audiotrack' only showing
entries with 'audiotrack'.'file_id' matching the currently selected
'file'.'id'). The backend is mysql.

This happened to work before. After the update to 4.3.0, the 'file'.'id' as a
foreign key in the 'audiotrack' subform seems to not be updated on changing
main records.

Two related problems:

1) The records of the second table ('audiotrack') are never updated, they only
show records belongig to the first shown 'file' entry. When a record has no
'file' entry, they disappear; after selecting another record with existing
'file' entries, the same wrong records appear again.

2) It is not possible to add records, the insertion fails with:
SQL Status: 23000
Error code: 1452

Cannot add or update a child row: a foreign key constraint fails
("movies"."subtitletrack", CONSTRAINT "subtitletrack_ibfk_1" FOREIGN KEY
("file_id") REFERENCES "file" ("id") ON DELETE CASCADE ON UPDATE CASCADE)



Steps to reproduce:
1. Change to another record
2. Enter a new record in the 'subtitletrack' form

Current behavior:
1. The records in 'subtitletrack' do not change
2. It is not possible to save the newly created record

Expected behavior:
1. The records in 'subtitletrack' should change according to the selected
'file' record
2. New records should be saved with the correct foreign key

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to