Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-23592

QSqlTableModel: generated flags not preserved across insertRecord()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.8.3
    • 4.8.0
    • SQL Support
    • None
    • Database PostgreSQL 9.1.1
    • f8edd0bad1f41267a1805297a5bc8717685cad2a

    Description

      When calling QSqlTableModel::insertRecord(-1, rec) on a table with a primary key that auto increments, the insert fails with the following SQL error:

      "ERROR: null value in column "id" violates not-null constraint
      QPSQL: Unable to create query"

      This call was working fine in QT 4.7.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mabrand Mark Brand
            jkinross Jeffrey Kinross
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes