doc: Explicitly mention that QSqlRecord fields are generated by default
Task-number: QTBUG-38460 Change-Id: I5982d018ebf239eb95dba59e2c5559bf5b5ce6ca Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
This commit is contained in:
parent
57868b6081
commit
4deea4b905
@ -1368,12 +1368,12 @@ QSqlRecord QSqlTableModel::record(int row) const
|
||||
target fields are mapped by field name, not by position in
|
||||
the record.
|
||||
|
||||
Note that the generated flags in \a values are preserved
|
||||
and determine whether the corresponding fields are used when
|
||||
changes are submitted to the database. The caller should
|
||||
remember to set the generated flag to FALSE for fields
|
||||
where the database is meant to supply the value, such as an
|
||||
automatically incremented ID.
|
||||
Note that the generated flags in \a values are preserved to
|
||||
determine whether the corresponding fields are used when changes
|
||||
are submitted to the database. By default, it is set to \c true
|
||||
for all fields in a QSqlRecord. You must set the flag to \c false
|
||||
using \l{QSqlRecord::}{setGenerated}(false) for any value in
|
||||
\a values, to save changes back to the database.
|
||||
|
||||
For edit strategies OnFieldChange and OnRowChange, a row may
|
||||
receive a change only if no other row has a cached change.
|
||||
|
Loading…
x
Reference in New Issue
Block a user