https://issues.qgis.org/https://issues.qgis.org/favicon.ico2015-06-04T01:36:15ZQGIS Issue TrackingQGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=618062015-06-04T01:36:15ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Category</strong> set to <i>Digitising</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>I cannot confirm, please attach sample data.</p> QGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=618082015-06-04T02:09:56Zmagnus hoeirup
<ul></ul><p>Giovanni Manghi wrote:</p>
<blockquote>
<p>I cannot confirm, please attach sample data.</p>
</blockquote>
<p>The data is loaded from a Oracle Spatial server.</p>
<p>When I add a new feature to the layer, it can be saved, but if a feature is copied I get this error when I try to save the changes:</p>
<pre><code>Could not commit changes to layer F_KIRKEGD_GRAVSTEDER<br /> Errors: ERROR: 1 feature(s) not added.<br /> Provider errors:<br /> Oracle error while adding features: Oracle error: Could not insert feature -22<br /> SQL: ORA-01400: kan ikke indsætte NULL i ("CPN"."F_KIRKEGD_GRAVSTEDER"."MI_PRINX")<br /> Unable to execute statement<br /> Error: INSERT INTO "CPN"."F_KIRKEGD_GRAVSTEDER"("SDO_GEOMETRY","MI_PRINX") VALUES (:f,:fb)</code></pre>
<p>"kan ikke indsætte" means: cannot insert/assign</p> QGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=618092015-06-04T03:36:00ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li><li><strong>OS version</strong> changed from <i>Service Pack 1</i> to <i>7</i></li><li><strong>Operating System</strong> changed from <i>Windows 7 64bit</i> to <i>Windows</i></li><li><strong>Category</strong> changed from <i>Digitising</i> to <i>Data Provider/Oracle</i></li><li><strong>Subject</strong> changed from <i>copy feature to same layer does not copy attributes</i> to <i>copy/paste features to same Oracle layer does not work</i></li></ul><blockquote>
<p>The data is loaded from a Oracle Spatial server.</p>
</blockquote>
<p>this is an important detail :)</p> QGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=622132015-06-09T11:47:50ZJürgen Fischerjef@norbit.de
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>magnus hoeirup wrote:</p>
<blockquote>
<p>Could not commit changes to layer F_KIRKEGD_GRAVSTEDER<br />Errors: ERROR: 1 feature(s) not added.<br />Provider errors:<br />Oracle error while adding features: Oracle error: Could not insert feature -22<br />SQL: ORA-01400: kan ikke indsætte NULL i ("CPN"."F_KIRKEGD_GRAVSTEDER"."MI_PRINX")<br />Unable to execute statement<br />Error: INSERT INTO "CPN"."F_KIRKEGD_GRAVSTEDER"("SDO_GEOMETRY","MI_PRINX") VALUES (:f,:fb)</p>
<p>"kan ikke indsætte" means: cannot insert/assign</p>
</blockquote>
<p>I guess "MI_PRINX" is your primary key. The primary keys are skipped (or set to the default value) on paste, because there would be duplicate key otherwise. You need to assign a new value to the keyfield before committing.</p> QGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=622952015-06-11T23:19:36Zmagnus hoeirup
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>magnus hoeirup wrote:</p>
<blockquote>
<p>...</p>
</blockquote>
<p>I guess "MI_PRINX" is your primary key. The primary keys are skipped (or set to the default value) on paste, because there would be duplicate key otherwise. You need to assign a new value to the keyfield before committing.</p>
</blockquote>
<p>MI_PRINX is used by MapInfo as a primary key, and GeoMedia has the option to use it as a primary key. But is it a feature that exists in QGIS? Or do I have to manually guess the next step in the primary key sequence?<br />Still all the other attributes are NULL as well, when I copy/paste a polygon.</p> QGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=623062015-06-12T04:15:21ZJürgen Fischerjef@norbit.de
<ul></ul><p>magnus hoeirup wrote:</p>
<blockquote>
<p>MI_PRINX is used by MapInfo as a primary key, and GeoMedia has the option to use it as a primary key. But is it a feature that exists in QGIS? Or do I have to manually guess the next step in the primary key sequence?</p>
</blockquote>
<p>Depends on how it's implemented. If it uses a trigger to set the primary on INSERT it would work. Also it you set it by default value. Otherwise you indeed have to figure out a free id and assign it manually.</p>
<blockquote>
<p>Still all the other attributes are NULL as well, when I copy/paste a polygon.</p>
</blockquote>
<p>Ok. What other attributes are there? So far only "SDO_GEOMETRY" and "MI_PRINX" were mentioned.</p> QGIS Application - Bug report #12872: copy/paste features to same Oracle layer does not workhttps://issues.qgis.org/issues/12872?journal_id=647452015-10-20T01:13:48Zmagnus hoeirup
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>I am no longer part of the project, so i can't provide additional information.</p>