<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hey Mathias,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks!! That worked wonderfully well. <br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">WRT the documentation, yes, I would say that it is poorly documented, but is definitely something I would like to assist in rectifying. Just forked qgis/QGIS-Documentation so hopefully, I can have a go at it on the weekend.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span class="gmail-fork-flag gmail-mt-1"><span class="gmail-text"></span></span>
</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br clear="all"></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rhys</div>Peace & Love | Live Long & Prosper</div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 3, 2020 at 1:18 AM Matthias Kuhn <<a href="mailto:matthias@opengis.ch">matthias@opengis.ch</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">
<div>
<p>Hi Rhys,</p>
<p>Ironically, this situation is exactly what transaction mode has
been added for (to avoid the situation where someone clicks the
save windows button before the save footprint button).</p>
<p>The solution is not that obvious though (and might be poorly
documented): Enable "deferred constraint checks" in your database
and it will only check if foreign key constraints are ok at commit
time (when you save it) and not while editing. If by any chance
you get around to adding this information into the documentation,
this will be much appreciated!<br>
</p>
<p>Bests</p>
<p>Matthias<br>
</p>
<div>On 3/3/20 6:23 AM, Rhys A.D. Stewart
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div style="font-family:trebuchet ms,sans-serif">Greetings All,</div>
<div style="font-family:trebuchet ms,sans-serif"><br>
</div>
<div>I'm working with transaction groups and tables with
relations (database foreign keys). Let's say that there are
two tables, 'building_footprints' and 'windows'. The windows
table references the 'building_footprints' table. I've added
the relations in QGIS through the Project properties |
relations dialog so that when editing 'building_footprints' I
can add a child record for 'windows'. Now because I have
transaction groups active, the changes are pushed back to the
database immediately, if I create a child record before saving
the parent record this causes a problem because the parent
record doesn't exist<span class="gmail_default" style="font-family:trebuchet ms,sans-serif">. It is often
the case that I am going to add child records when I'm
creating the parent record, so adding a parent record,
saving it, then editing it just to add the child record
becomes cumbersome.<br>
</span></div>
<div><span class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br>
</span></div>
<div><span class="gmail_default" style="font-family:trebuchet ms,sans-serif"> I figured that someone must've had this
issue before, but can't seem to find any documentation about
this. Is there a workaround for this? (other than not using
transaction groups and saving each layer individually) Or
have I just missed something extremely obvious?<br>
</span></div>
<div><span class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br>
</span></div>
<div><span class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br>
</span></div>
<div><span class="gmail_default" style="font-family:trebuchet ms,sans-serif">Rh</span>ys</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">Peace & Love | Live Long &
Prosper</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Qgis-user mailing list
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
</div>
</blockquote></div></div>