Code like this (with a MYSQL backend) worked fine with Qt 4.8:
m_supportTableModel = new QSqlTableModel(this);
QSqlRecord record = m_supportTableModel->record(0);
qDebug() << record; // all fields had generated: yes
m_supportTableModel->submitAll(); // returned true
With Qt 5.2, all fields have "generated: no", and therefore the value for CODE_SUPPORT isn't stored (and the submitAll fails since this is a required value).
Since I use QDataWidgetMapper for the other fields, they go through QSqlTableModel::setData which calls ModifiedRow::setValue which sets generated to true. Why doesn't QSqlRecord::setValue do the same, for the case of values set by the application?
The documentation for QSqlTableModel::setRecord says "remember to set generated to false if the db is meant to supply the value"... well, I'm supplying all the values, so I didn't expect to have to set it to true, it sounds like it's the default – and it was, in Qt 4.8.