qt5base-lts/tests/auto/sql/models/qsqltablemodel
Mark Brand c3ae1c76f3 QSqlTableModel: support refreshing inserted rows with auto columns
Previously, selectRow() did not work after INSERTing a new row into a
table with an automatically populated column. It did not work because
the model did not know the primary values for the new row. Newly
inserted rows were therefore not refreshed in OnFieldChange and
OnRowChange edit strategies.

This change provides support for the typical simple case where a single
column is populated by the database and can be retrieved with
QSqlQuery::lastInsertId().

Task-Number: QTBUG-29102
Change-Id: Ibf0f0ac8661185bde57034ddf40c2178bece4778
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Lukas Geyer <lgeyer@gmx.at>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-06 07:57:47 +01:00
..
.gitignore Moved sql autotests into new directory structure 2011-09-06 09:32:15 +02:00
qsqltablemodel.pro QSqlTableModel::selectRow(): don't expand cache if there is no change 2012-10-05 03:16:25 +02:00
tst_qsqltablemodel.cpp QSqlTableModel: support refreshing inserted rows with auto columns 2013-02-06 07:57:47 +01:00