[Qgis-developer] Re: addFeatures without knowing new feature's id, bug?

Denis Rouzaud denis.rouzaud at gmail.com
Thu Jan 19 01:34:26 EST 2012


Hi Jürgen,

Thanks for the fix.
I tested it, and I have a small problem.

It is working perfectly if I give an initial feature id. The id is 
effectively given backed using
ok,feature = provider.addFeatures([f])

But, if I do not fill the ID field before insertion, ok is False, and of 
course no id in the feature.

Can it come from the type of primary key used in postgres? I use a 
serial. I try to understand your diff, and I wonder if I have to use 
OIDs to have this working as expected.

Thanks again.
Greetings,

Denis



On 01/18/2012 10:07 PM, Jürgen E. Fischer wrote:
> Hi Denis,
>
> On Tue, 17. Jan 2012 at 22:28:21 -0800, 3nids wrote:
>> Btw, is there a way of knowing the ID of a written feature?
> 6a8a9d44 should add this - the feature ids of the features passed into
> addFeatures are updated.
>
> Jürgen
>


More information about the Qgis-developer mailing list