Thanks all for pointing things out!

My view did have a unique id, it is just a sub set of another table. So by selecting it everything is solved.


On 26-03-15 11:45, Matthias Kuhn wrote:
Hi Raymond,

The feature shown in the identify result is the one queried with the
geographic location.

For some reason the feature shown in the feature form is not a copy of
the identified data (feature) but queried again with its feature id.

For the views on pg databases I have here, the primary key of the main
source table is shown (which is the first field of the query that
defines the view), so it is fine by default. Not sure about the
heuristics used to get the default PK field.

Matthias

On 03/26/2015 10:57 AM, Raymond Nijssen wrote:
Thanks Regis, that was exactly the issue. The (boolean!) field
'inonderzoek' was used as a key. When I change that to 'gid' in the
Add PostGIS Table dialog, everything works correctly.

Can anyone tell me why QGIS picks that boolean field for most of my
tables? Can I change that behaviour by changing my database structure?

http://terglobo.nl/downloads/qgis_add_postgis_table_wrong_key.png

And how can the identify results be correct anyway?

Tnx,
Raymond


dbname='bag' host=localhost port=5432 user='postgres' sslmode=disable
key='inonderzoek' estimatedmetadata=true srid=28992 type=POLYGON
table="bagactueel"."pandactueelbestaand" (geovlak) sql=



On 26-03-15 10:34, Régis Haubourg wrote:
Hi, I have seen such troubles when the choosen primary key from qgis
side is
not unique .

Symptoms: selecting one feature select severals unrelated features of
the
same layer. relation with attributes is broken also.

Can you check in your layer's definition (general tab of layer
properties)
if you choose gid field as key, and check if it is really unique in
postgis?

Cheers
Régis



--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/wrong-attribute-values-for-postgis-data-in-Feature-attribute-form-tp5195518p5195523.html
Sent from the Quantum GIS - Developer mailing list archive at
Nabble.com.
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer






_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer


--
Terglobo
Ampèrestraat 110
5223 CT 's-Hertogenbosch
06-25314983
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to