v.external db connection key missing for some GDAL drivers
|Reported by:||rblazek||Owned by:|
If OGR_L_GetFIDColumn does not return a column (OGR SHP driver for example) it is then missing in db connection info and consequently db operations do not work on vector created using v.external. The problem is here http://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/field.c#L8
and there is already TODO here http://trac.osgeo.org/grass/browser/grass/trunk/lib/vector/Vlib/field.c#L582
The problem can be tested either by v.db.connect -p, no key printed or d.what.vect for example (key field missing in query).
I dont think it can be easily fixed. It would be possible to add OGR FID to attributes, but OGR SQL engine most probably does not know about FID, it only works on true attributes (to be verified, maybe FID is available with some special name).