<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>If you enable "evaluate default values server side" and
"automatic transaction groups" and set the foreign key check in
the database to initially deferred you'll get pretty much what you
want :)</p>
<p>Hope that helps<br>
</p>
<p>Matthias<br>
</p>
<div class="moz-cite-prefix">On 6/4/19 11:14 AM, Karl Magnus Jönsson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fafd6e53210d48b2a1db01b43f52e038@kristianstad.se">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Franklin Gothic Book";
panose-1:2 11 5 3 2 1 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-postmall17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><a name="T_Default_New"
moz-do-not-send="true">Hi list!<o:p></o:p></a></p>
<p class="MsoNormal">I have a project with tree tabels stored in
PostGIS. <span lang="EN-US">
One is holding the geometry the other two is holding data
related to the first table as child and grandchild. I have
set up foreign keys between the tables in the database to be
sure that there will be no orphan records. In QGIS there are
relations and (sub)forms. When I digitize a new geometry I
get the new id from the database (before it’s saved, OK) in
the form but I can’t add any children. I get a database
error that says that there are no parent with that ID (and
that’s true). I have to press OK to create the feature in
QGIS, change tool to identify, find the feature and klick on
it to open the form again. Then I can add children. But I
haven’t saved so there is still no parent. But it works
then. It’s the same with the grandchild table but then the
grandparent form is still open so it’s not such a big
problem. Anyone got a better way to skip this closing and
reopening of the form in the workflow?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:black;mso-fareast-language:SV">Karl-Magnus
Jönsson</span></b><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:black;mso-fareast-language:SV">
| Gis-Utvecklare<br>
Geografisk information<br>
Miljö- och samhällsbyggnadsförvaltningen<br>
Kristianstads kommun<br>
Besöksadress: Västra Storgatan 12<br>
Postadress: 291 80 KRISTIANSTAD<br>
Telefon: 044-135416 | Mobil: 0733-135416<br>
E-post: </span><a
href="mailto:Karl-Magnus.Jonsson@kristianstad.se"
moz-do-not-send="true"><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:blue;mso-fareast-language:SV">Karl-Magnus.Jonsson@kristianstad.se</span></a><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:black;mso-fareast-language:SV">
<br>
</span><a href="http://www.kristianstad.se/"
moz-do-not-send="true"><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:blue;mso-fareast-language:SV">www.kristianstad.se</span></a><span
style="mso-fareast-language:SV"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:SV"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:black;mso-fareast-language:SV">Läs
mer om hur vi hanterar dina personuppgifter på
</span><a href="http://www.kristianstad.se/personuppgifter"
moz-do-not-send="true"><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:blue;mso-fareast-language:SV">www.kristianstad.se/personuppgifter</span></a><span
style="font-size:10.0pt;font-family:"Franklin Gothic
Book","sans-serif";color:black;mso-fareast-language:SV"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
</body>
</html>