Bug report #21717
QGIS is assuming first column from Oracle DB is the primary key
|Affected QGIS version:||3.4.0||Regression?:||No|
|Operating System:||Windows 10||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||29532|
When trying to load a table into Oracle with primary key GID (1st column) with non unique IDs, an error shows "Primary key field 'GID' for view not unique." when adding a new column ID with unique IDs (based on row numbers) as new primary key (last column) and using refresh icon in Browser pane, the same error message appears despite ID becoming new primary key. Oracle provider even retains previous information about Oracle PK's or is assuming the first column is PK.