My db Снимок экрана от 2018-06-13 18-55-19.jpg
personnelModel = new QSqlRelationalTableModel(this,db);
personnelModel->setTable("Personnel");
currentModel = operationModel;
currentModel->setRelation(currentModel->fieldIndex("Articul_idArticul"),QSqlRelation("Articul", "idArticul", "Number"));
// qDebug()<<currentModel->lastError()<<currentModel->query().lastQuery();
currentModel->setEditStrategy(QSqlRelationalTableModel::OnFieldChange);
currentModel->select();
ui->tableView->setModel(currentModel);
The data is correctly displayed.
Qt does not issue errors.
After selecting in the combobox, the value is not updated, I looked up the database logs and saw it
Снимок экранаКонсоль.jpg
Why does "is null" appear?