<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>    > On 04/11/2012 10:15 PM, Piotr Pachół wrote:<br>    ><br>> Hello,<br>      > <br>> I have table in PosGIS, which has 2 geometries: geometry(Point)<br>      > and geometry(MultiPolygon).<br>      > <br>> Two geometries is because each object/record of table has 2<br>      > representations: as point and as polygon.<br>      ><br>      > In Qgis this table is displayed as two layers: point layer and<br>      > polygon layer.<br>      ><br>> When I create new object I have problem, because I can't add/edit<br>      > at the same time two geometries in one record of table.<br>      ><br>> When I add one object in  point layer and one object in polygon<br>      > layer I have 2 records in PostGIS table - I would like to have one<br>      > record.<br><br>This is the correct behaviour. You are
 telling QGIS to create a new record each time, so it does. Twice. What you need to do is create the new record (with either a point or polygon geometry), then update (edit)  this record to add the missing geometry value.<br><br>You could have PostGIS apply a trigger upon the creation of a record (with a new polygon geometry) to populate the point geometry column with either the polygon centroid (which may lie outside the polygon) or an arbitrary point lying within the polygon.<br><br><br>Brent Wood<br></td></tr></table>