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 13, 2016
1 parent 6c31e4b commit 9d13f5b2306421d8951251fe375711adcaac984a
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, u"", uniqueCol)
uri.setDataSource(u"", u"({})".format(sql), geomCol, u"", uniqueCol.strip(u'"'))
if avoidSelectById:
uri.disableSelectAtId(True)
provider = self.dbplugin().providerName()

0 comments on commit 9d13f5b

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