<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    I agree, so in my algorithms working with geopackage I always
    redefined  FID with <br>
    <br>
    options = QgsVectorFileWriter.SaveVectorOptions()<br>
    options.layerOptions = ['FID=id']<br>
    <br>
    For me it is like a primary key in PostGIS, I need to manage it.<br>
    Other point, Feature ID in QGIS is still a short integer.<br>
    <br>
    Regards,<br>
    René-Luc<br>
    <br>
    <div class="moz-cite-prefix">Le 19/03/2020 à 10:28, Régis Haubourg a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CABgOYCcm6P0ND+zgBq7-K-a39JCyg7cMRjy8Y=2hs88_1N+_RA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">+1000. I was so relieved of the fid/oid/mapinfo_id
        when QGIS arrived and allowed business logic primary keys. 
        <div dir="auto"><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">Le jeu. 19 mars 2020 à 07:52,
          Nathan Woodrow <<a href="mailto:madmanwoo@gmail.com"
            moz-do-not-send="true">madmanwoo@gmail.com</a>> a écrit :<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">I agree.  
            <div><br>
            </div>
            <div>If there is an ID that is used internally as a
              unique primary key it should never be shown to the user.
              It should not be expected to be edited outside of the
              provider's control or be stable between edits. </div>
            <div><br>
            </div>
            <div>If you need a stable ID for reference you should make
              your own {{insert rant about people wanting to use
              increating ints as a reference ID}} </div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Thu, Mar 19, 2020 at
              4:04 PM Nyall Dawson <<a
                href="mailto:nyall.dawson@gmail.com" target="_blank"
                rel="noreferrer" moz-do-not-send="true">nyall.dawson@gmail.com</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">Hi list,<br>
              <br>
              Just wondering what everyone's thoughts are about
              geopackage FID<br>
              columns. Personally, I find them an absolute nightmare to
              deal with,<br>
              resulting in annoying (and dangerous) issues when trying
              to save<br>
              geopackage edits, such as<br>
              - field type issues: converting certain formats to
              geopackage fails,<br>
              because existing fields with name "fid" are of an
              incompatible type<br>
              with geopackage. Solution: manually uncheck the "fid"
              field from the<br>
              "save as" dialog.<br>
              - unique constraint violations: we've mostly fixed this in
              processing,<br>
              but it's still unfortunately really common to get failures
              when saving<br>
              edits to geopackage because some operation has resulted in
              duplicate<br>
              fids. This can be a nightmare to fix, if it's even
              possible to do so.<br>
              <br>
              I personally HATE HATE HATE these columns, and would
              rather I never<br>
              saw them ever again. Does anyone else feel the same? If
              so, could we<br>
              potentially just permanently hide these columns from QGIS
              and avoid<br>
              all these dangerous issues for users?<br>
              <br>
              Nyall<br>
              _______________________________________________<br>
              QGIS-Developer mailing list<br>
              <a href="mailto:QGIS-Developer@lists.osgeo.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a><br>
              List info: <a
                href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
              Unsubscribe: <a
                href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
          </div>
          _______________________________________________<br>
          QGIS-Developer mailing list<br>
          <a href="mailto:QGIS-Developer@lists.osgeo.org"
            target="_blank" rel="noreferrer" moz-do-not-send="true">QGIS-Developer@lists.osgeo.org</a><br>
          List info: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
          Unsubscribe: <a
            href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
            rel="noreferrer noreferrer" target="_blank"
            moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </body>
</html>