Skip to content

Commit c0d9275

Browse files
committedJan 22, 2013
oracle provider: accept number(0) as key
1 parent ab9862f commit c0d9275

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/providers/oracle/qgsoracleprovider.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,10 @@ bool QgsOracleProvider::determinePrimaryKey()
12351235

12361236
if ( idx >= 0 )
12371237
{
1238-
if ( mAttributeFields[idx].type() == QVariant::Int || mAttributeFields[idx].type() == QVariant::LongLong )
1238+
const QgsField &fld = mAttributeFields[idx];
1239+
if ( fld.type() == QVariant::Int ||
1240+
fld.type() == QVariant::LongLong ||
1241+
( fld.type() == QVariant::Double && fld.precision() == 0 ) )
12391242
{
12401243
if ( mUseEstimatedMetadata || uniqueData( mQuery, primaryKey ) )
12411244
{

0 commit comments

Comments
 (0)
Please sign in to comment.