[KEXI] [Bug 432359] New: Crash attempting to apply 2 queries as foreign key of a table

Antonio bugzilla_noreply at kde.org
Sun Jan 31 17:06:52 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=432359

            Bug ID: 432359
           Summary: Crash attempting to apply 2 queries as foreign key of
                    a table
           Product: KEXI
           Version: 3.2.0
          Platform: Compiled Sources
                OS: Microsoft Windows
            Status: REPORTED
          Severity: grave
          Priority: NOR
         Component: Tables
          Assignee: kexi-bugs at kde.org
          Reporter: antonio.angelo at protonmail.com
                CC: adam at piggz.co.uk, inksi at fables.co.za
  Target Milestone: ---

SUMMARY

A field in a table cannot be populated by a lookup query from the same table. 

STEPS TO REPRODUCE

1. Create new blank database my_db
2. Create new table an_actors as: 
    id_actor integer, PK, autoincrement
    tx_actor text
    tx_gender text
    id_father integer
    id_mother integer
3. Populate an_actors with 2 records: 
    tx_actor,   tx_gender
    '(unknown)' '(unknown)'
    'White'     'M'
    'Black'     'F'
4. Create new query qry_fathers from an_actors:
    id_actor AS id_father
    tx_actor AS tx_father
    WHERE tx_gender <> 'F'
5. Create new query qry_mothers from an_actors:
    id_actor AS id_mother
    tx_actor AS tx_mother
    WHERE tx_gender <> 'M'
6. Table and queries were tested OK.

7. Open table an_actors in design mode, opening field id_father Lookup column: 
    Record source: qry_fathers
    Bound column: id_actor
    Visible column: tx_actor

8. Switch from Lookup column to Properties, then Save table (without switching,
Kexi crashes).

9. Open table an_actor in data mode, specifying id_father '(unknown)' for each
tx_actor ('White', 'Black'), the save record.

10. Open again table an_actor but all records have tx_actor='(unknown)'.

OBSERVED RESULT
tx_actor is filled with the tx_value returned by the lookup query, and aliases
seems to be useless.
It seems not possible to use a query from the same table, as a lookup table.

EXPECTED RESULT
tx_actor should remain untouched, while id_father and id_mother should return
the tx_value selected in the lookup query.
If I add a field to be populated from a lookup query from a different table,
the problem does not arise.

SOFTWARE/OS VERSIONS
Windows: 10 Home

ADDITIONAL INFORMATION
This problem is highly reproducible.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Kexi-bugs mailing list