[QGIS-Developer] OGR/GBD: Unrecognized field name OBJECTID (was: Re: Warning - possible project corruption in 2.18.13)

Sandro Mani manisandro at gmail.com
Wed Sep 20 02:34:50 PDT 2017


On 20.09.2017 08:45, Nyall Dawson wrote:

> On 20 September 2017 at 10:18, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>> Hi all,
>>
>> I've just been trying to diagnose an issue with loading an existing
>> 2.18 project in the new 2.18.13 release.
>>
>> Seems like something may be broken here with regards to loading OGR
>> based layers which have a subset filter set.
>>
>> These layers trigger the "missing layers" dialog when loading the
>> project and the layer link cannot be repaired without removing the
>> filter clause.
>>
>> (specifically this is with .gdb layers on Windows - not sure yet if
>> it's restricted to this combination).
>>
>> So just a heads up to test your existing projects before rolling out
>> the 2.18.13 update.
> Failing unit test is here: https://github.com/qgis/QGIS/pull/5222,
> regression bisected to https://github.com/qgis/QGIS/commit/8eaeaaa
>
> Sandro can you take a look at this?
Argh.

So the result of the subset query

SELECT OBJECTID as orig_ogc_fid, * FROM "lines" WHERE "text" = 'shape 2'

now is

305: OGR(1): OGR[3] error 1: Unrecognized field name OBJECTID.
305: OGR(1): Data source is invalid (Unrecognized field name OBJECTID.)

but OBJECTID is what was returned by

OGR_L_GetFIDColumn( layer )

Even, any ideas?


Sandro


More information about the QGIS-Developer mailing list