Skip to content
Permalink
Browse files

DBManager oracle plugin: strip '"' on unique col

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 91b0e7f commit f5373ac3b9f536d1a72ac54f4484670fbd660566
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/db_manager/db_plugins/oracle/plugin.py
@@ -203,7 +203,7 @@ def toSqlLayer(self, sql, geomCol, uniqueCol,
uri = self.uri()
con = self.database().connector

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

0 comments on commit f5373ac

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