[Libreoffice-bugs] [Bug 68153] EDITING: Query input in foreignkey-field impossible, when two tables in the query.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jun 4 16:10:55 UTC 2017


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

--- Comment #25 from Howard Johnson <BridgeportContractor at gmail.com> ---
(In reply to robert from comment #22)
> And this is the bug I reported:
> 
> You couldn't change the foreign-key-field, but you could change the content
> of the table, which is linked to the first table by this foreign-key.
> 
> I would prefer:
> You could change the foreign-key-field, but you could not change the content
> of the table, which is linked to the first table by this foreign-key. 
> This would protect the user to unconscious change the content of many rows
> of the first table by changing the content of one field of the second table
> linked to the first by the foreign-key.

Robert, perhaps I haven't described this adequately.  Let me try to explain it
again.


Consider this simple set of tables:

    +-----------+
    | Table1_ID |
    +-----------+        +-----------+
    | Table2_FK | -----> | Table2_ID |
    +-----------+        +-----------+
    | Name      |        | Title     |
    +-----------+        +-----------+
    | ...                | ...


    SELECT   Table1_ID, Table2_FK, Name, ..   Table2_ID, Title ..
    FROM Table1 Right Join Table2 ...


    +-----------+-----------+------+.. +-----------+-------+..
    | Table1_ID | Table2_FK | Name |   | Table2_ID | Title |
    +-----------+-----------+------+.. +-----------+-------+..
    |         0 |         0 | Mike |   |         0 | Clerk |
    +-----------+-----------+------+.. +-----------+-------+..


If you edit Table2_FK and change it for example from 0 to 1, and then move the
focus either left or right, to another cell on the same row, then any dirty
Table2 fields are first saved, and the newly pointed to record in Table2 is
displayed in it's place.

Because only one field can be edited at a time, this works beautifully, and it
resolves the question Lionel had asked.


Now once you have that in hand, the next step is what new features does this
make possible?

* It makes it so that forms that use a query for a data-source, are also now
more often editable.  In particular you can edit joined tables, instead of just
simple tables.  The form will also need to save and update fields just the same
as the query does above.  In a table control this should be fairly easy to make
this work I think.

Hope I have explained this better.  I'm excited about this becoming reality
someday.

-- 
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/20170604/e6537030/attachment.html>


More information about the Libreoffice-bugs mailing list