<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Sorry for double posting, but my first message is waiting for
moderation because of attach file size...<br>
<br>
I am trying to import a PostGis layer into a SpatiaLite database,
using QGIS Database Manager import function.<br>
<br>
The PostGis layer has a string primary key, and I want to keep that
primary key.<br>
<br>
To keep the primary key, I check "Primary key" option and type the
name of the PostGis primary key field, but the result is an empty
column...<br>
I tried to workaround this problem by keeping primary key values in
a second column and getting them back after the import, this used to
work with QGIS V2.8, but doesn't anymore with QGIS V2.14.<br>
<br>
Here is the result I get :<br>
- When opened in QGIS Database Manager, I can see correct values in
the id column.<br>
- When opened in QGIS, every record has the same id value.<br>
<br>
So my questions are :<br>
- Why isn't it possible to keep PostGis primary key when importing
to SpatiaLite with QGIS Database Manager ?<br>
- How to workaround this problem ?<br>
<br>
Thank you for helping,<br>
<pre class="moz-signature" cols="72">--
Christophe</pre>
<div class="moz-cite-prefix">Le 07/04/2016 à 14:01, Christophe
Damour a écrit :<br>
</div>
<blockquote
cite="mid:8f7c590b-851a-f5c5-4ec2-a25c2db192e8@sigeal.com"
type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
Hi,<br>
<br>
I am trying to import a PostGis layer into a SpatiaLite database,
using QGIS Database Manager import function.<br>
<br>
The PostGis layer has a string primary key, and I want to keep
that primary key.<br>
<br>
To keep the primary key, I check "Primary key" option and type the
name of the PostGis primary key field, but the result is an empty
column...<br>
I tried to workaround this problem by keeping primary key values
in a second column and getting them back after the import, this
used to work with QGIS V2.8, but doesn't anymore with QGIS V2.14.<br>
<br>
Attached to this message is an example SpatiaLite database that
illustrates the result I get :<br>
- When opened in QGIS Database Manager, I can see correct values
in the id column.<br>
- When opened in QGIS, every record has the same id value.<br>
<br>
So my questions are :<br>
- Why isn't it possible to keep PostGis primary key when importing
to SpatiaLite with QGIS Database Manager ?<br>
- How to workaround this problem ?<br>
<br>
Thank you for helping,<br>
<pre class="moz-signature" cols="72">--
Christophe</pre>
<br>
</blockquote>
<br>
</body>
</html>