[Geoserver-users] WFS-T on PostGIS: Insert a feature comprising multiple tables

Hi Geoserver-users and developers,

i have a question:

I have to create a WFS-T service backed by PostGIS using GeoServer. The WFS-T is supposed to insert, update a delete features of one certain type.

Problem: A feature is made up of one main table “event”. The “event” table contains the only geometry. The event has a many-to-many relationship to a “category” table. I.e. the result of one WFS-T transaction has to be an INSERT on the “event” table plus several INSERTs on the “event_category” table. “event_category” is just a N:M table consisting of the primary key of “event” and “category”. The primary keys on the tables are autogenerated by PostGIS.
AFAIK there is no simple solution for such a constellation.

  1. Which options do I have? Use app schema? Are there any extension points I can use to alter the interaction with the database? I am a Java Developer.
  2. What do you recommend?

Best regards,
waterman