qt5base-lts/tests/auto/sql/models/qsqltablemodel
Mark Brand 7389c09637 QSqlTableModel::selectRow(): fix failure on uncached rows
This method was originally intended for refreshing rows after
submitting changes. It should also work for refreshing rows
that are unchanged (i.e., not cached), but did not because
constructing the primary values depended on the cache. As a
consequence, the WHERE clause for the query was not created.

Fixed by deriving primary values for uncached rows from the
query record. Note that the cache is still authoritative for rows
it holds. This is important because the prmary values there may
differ from the original query record due to changes to columns
of the primary key.

Includes new test.

Change-Id: I41cca2cbf26019d4b495ffa6d876e2b55ec57803
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-09-24 21:27:51 +02:00
..
.gitignore Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00
qsqltablemodel.pro Set the Qt API level to compatibility mode in all tests. 2012-08-01 15:37:46 +02:00
tst_qsqltablemodel.cpp QSqlTableModel::selectRow(): fix failure on uncached rows 2012-09-24 21:27:51 +02:00