Skip to content


DBManager oracle plugin: strip '"' on unique col
Browse files Browse the repository at this point in the history
For Oracle provider, giving a quoted uniqueColumn in a uri to create a
QgsVectorLayer results in an invalid layer.

To fix it, strip '"' is applied to unique col.
  • Loading branch information
rldhont committed Jan 14, 2016
1 parent 6c31e4b commit 9d13f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/db_manager/db_plugins/oracle/
Expand Up @@ -203,7 +203,7 @@ def toSqlLayer(self, sql, geomCol, uniqueCol,
uri = self.uri()
con = self.database().connector

uri.setDataSource(u"", u"({})".format(sql), geomCol, u"", uniqueCol)
uri.setDataSource(u"", u"({})".format(sql), geomCol, u"", uniqueCol.strip(u'"'))
if avoidSelectById:
provider = self.dbplugin().providerName()
Expand Down

0 comments on commit 9d13f5b

Please sign in to comment.