Skip to content
Permalink
Browse files

Merge pull request #9139 from elpaso/bugfix-21176-spatialite-text-pk

Fix spatialite text PKs
  • Loading branch information
elpaso committed Feb 10, 2019
2 parents 3ae5038 + 3736fc0 commit e6cce107aeac74a3e860a24a7b0f744974042297
@@ -355,7 +355,7 @@ bool QgsSpatiaLiteFeatureIterator::prepareStatement( const QString &whereClause,
if ( limit >= 0 )
sql += QStringLiteral( " LIMIT %1" ).arg( limit );

// qDebug() << sql;
QgsDebugMsgLevel( sql, 4 );

if ( sqlite3_prepare_v2( mHandle->handle(), sql.toUtf8().constData(), -1, &sqliteStatement, nullptr ) != SQLITE_OK )
{
@@ -515,6 +515,7 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f
}
else
{
QgsDebugMsgLevel( QStringLiteral( "Primary key is not an integer field: setting autoincrement fid" ), 3 );
// autoincrement a row number
mRowNumber++;
feature.setId( mRowNumber );

0 comments on commit e6cce10

Please sign in to comment.
You can’t perform that action at this time.