Skip to content
Permalink
Browse files
fix: always used type of first column of view as PK type
  • Loading branch information
MorriganR authored and nyalldawson committed Jun 29, 2021
1 parent 8eb2a97 commit 7be85fe1a7fa8c17edf5eb811cadf1bcdc33f031
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/providers/postgres/qgspostgresprovider.cpp
@@ -1787,7 +1787,7 @@ void QgsPostgresProvider::determinePrimaryKeyFromUriKeyColumn()
mPrimaryKeyType = PktFidMap; // Map by default
if ( mPrimaryKeyAttrs.size() == 1 )
{
QgsField fld = mAttributeFields.at( 0 );
QgsField fld = mAttributeFields.at( mPrimaryKeyAttrs.at( 0 ) );
mPrimaryKeyType = pkType( fld );
}
}

0 comments on commit 7be85fe

Please sign in to comment.